<template>
    <div class="components-container">
        <!-- 编辑 -->
        <sweet-modal v-if="hidden" ref="dialog" class="dialog" :sweetModalMaxWidth="pageWidth" v-bind:blocking="true">
            <h3>{{title}}</h3>
            <el-button type="primary" @click="readDead">读取逝者身份证</el-button>
            <el-button type="success" @click="readAgent">读取经办人身份证</el-button>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="jbifm" />&nbsp;死者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline backcolor">
                                <el-input v-model="regData.REGNAME"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGSEX" filterable>
                                    <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">民族</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGNATION">
                                    <el-option v-for="item in mz" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date v-model="regDataEexend.RegBirthDate" type="date" @change="(value) => birthdaydata(value)"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者年龄</label>
                            <div class="layui-input-inline backcolor">
                                <el-input-number v-model="regData.REGAGE" :min="0"></el-input-number>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCARDTYPE" filterable>
                                    <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline backcolor">
                                <el-input v-model="regData.REGCARDNO" @change="(value) => identityNumber(value)"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">户籍地址</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="household" change-on-select v-model="ctyLists" filterable :show-all-levels="false">
                                </el-cascader>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label text-danger">逝者类型</label>
                                <div class="layui-input-inline backcolor">
                                    <el-select v-model="regData.REGBONETYPE">
                                        <el-option v-for="item in szlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" :disabled="item.disabled">
                                        </el-option>
                                    </el-select>
                                    <div class="triangle_border_up"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">死亡原因</label>
                                <div class="layui-input-inline backcolor">
                                    <el-cascader :options="cause" v-model="cauinfos" filterable>
                                    </el-cascader>
                                    <div class="triangle_border_up"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">详细地址</label>
                                <div class="layui-input-inline backcolor">
                                    <el-input class="longertext" placeholder="请输入内容" v-model="regData.REGDETAILADDRESS">
                                    </el-input>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" v-model="regDataEexend.regDeathDate" format="yyyy-MM-dd"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">到馆时间</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="datetime" v-model="regDataEexend.regDataTime" format="yyyy-MM-dd HH:mm"></el-date-picker>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">火化日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" placeholder="选择日期时间" v-model="regDataEexend.regCremationDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!this.isshowdaynum">
                            <!-- isshowdaynum -->
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowdaynum">
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0"></el-input>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->

                        <!-- <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">统计地点</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="area" v-model="carryArea" filterable :show-all-levels="false">
                                </el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowCreBy_YW">
                            <label class="layui-form-label" style="text-align:center;padding:0;">是否出具死亡证明</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISPOD" readonly></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="huohuaxinxi" />&nbsp;火化信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">减免类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGISKEYPOINT" :disabled="ischeck">
                                    <el-option v-for="item in jmlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="issee">
                            <label class="layui-form-label">减免证号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGREDCARDNO" style="width:150px"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">骨灰去向</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGGHQX" @change="isShowght($event)">
                                    <el-option :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" v-for="item in ghqx"></el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
                <label class="layui-form-label">服务方式</label>
                <div class="layui-input-inline">
                  <el-select v-model="regData.REGYITIQX">
                    <el-option :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue" v-for="item in serviceListType"></el-option>
                  </el-select>
                </div>
              </div> -->
                        <!-- </div>
            <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata" filterable clearable @change="carchange">
                                </el-cascader>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">驾驶员</label>
                            <div class="layui-input-inline">
                                <el-select v-model="cdhdata.CDHDRIVER" filterable>
                                    <el-option v-for="item in drivers" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">里程数</label>
                            <div class="layui-input-inline">
                                <el-input-number v-model="cdhdata.CDHMILEAGE" :min="0" style="width:150px"></el-input-number>公里
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCYADDRESS" @visible-change="selectAddr" placeholder="请选择常用接尸地址">
                                    <el-option v-for="item in commonAddr" :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue"></el-option>
                                </el-select>
                            </div>
                            <div class="layui-input-inline backcolor" style="width:600px">
                                <el-input v-model="regData.REGADDRESS" style="width:600px"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <!-- 级联式下拉框 -->
                            <div class="layui-input-inline" style="width:288px">
                                <el-cascader class="dz" ref="address" v-model="arr" style="width:288px" change-on-select :options="addressOptions" @change="selectAddr">
                                </el-cascader>
                            </div>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGADDRESS" style="width:570px"></el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <!-- 能修改的 -->
                        <!-- <div class="layui-inline" v-if="!this.isShowCharge">
              <label class="layui-form-label">冰柜号</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.ICENO"></el-input>
              </div>
            </div> -->
                        <div class="layui-inline" v-if="!this.isShowCharge && this.isshowxl">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.ICEID" filterable>
                                    <!-- 存储冰柜号icenum -->
                                    <el-option v-for="item in icenum" :key="item.ICEID" :label="item.ICENAME" :value="item.ICEID">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="this.isShowCharge || !this.isshowxl">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.ICENO" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                        <div v-if='false'>
                            <div class="layui-inline" v-if="!this.isshowltmanage || !this.isshowxl">
                                <label class="layui-form-label">灵堂号</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.LINNAME" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline" v-if="this.isshowltmanage && this.isshowxl">
                                <label class="layui-form-label">灵堂号</label>
                                <div class="layui-input-inline">
                                    <el-select v-model="regData.LINID">
                                        <el-option label="不选择" :value="null"></el-option>
                                        <el-option v-for="item in hallnumber" :key="item.value" :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isshowght && this.isGut && this.isshowghts">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                            <el-cascader :options="columbarium" v-model="GuHuiArea" filterable></el-cascader>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="!this.isGut">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                                <el-input v-model="ASSNAMEDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowgetbodytime">
                            <label class="layui-form-label">出车日期</label>
                            <div class="layui-input-inline chooseTime">
                                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="cdhdata.CDHACTUALDATE"></el-date-picker>
                                <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="cdhdata.CDHACTUALTIME" format='HH:mm'></el-time-picker>
                            </div>
                        </div>
                    </div>

                    <!-- <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">接尸地点</label>
              <div class="layui-input-inline">
                <el-select v-model="regData.REGCYADDRESS" @change="selectAddr" placeholder="请选择常用接尸地址">
                  <el-option :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue" v-for="item in commonAddr"></el-option>
                </el-select>
              
              </div>
              <div class="layui-input-inline">
                <el-input v-model="regData.REGADDRESS" style="width:570px"></el-input>
              </div>
            </div>
            </div> -->

                    <div class="layui-form-item">
                        <div class="layui-inline" style="width:575px;margin-right:0px;">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-inline">
                                <el-input type="textarea" class="longertext" v-model="regData.REGREMARK"></el-input>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
              <label class="layui-form-label">出车日期</label>
              <div class="layui-input-inline">
                <el-date-picker v-date type="datetime" v-model="regDataEexend.regDataTime" format="yyyy-MM-dd HH:mm"></el-date-picker>
              </div>
            </div> -->
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="qinren" />&nbsp;家属信息</legend>
                    <div class="layui-field-box">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">家属姓名</label>
                                <div class="layui-input-inline backcolor">
                                    <el-input v-model="regData.REGHANDLERNAME"></el-input>
                                    <div v-if="!onshow" class="triangle_border_up"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">家属性别</label>
                                <div class="layui-input-inline backcolor">
                                    <el-select v-model="regData.REGHANDSEX" filterable>
                                        <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">证件类型</label>
                                <div class="layui-input-inline">
                                    <el-select v-model="regData.REGHANDLERCARDTYPE" filterable>
                                        <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">证件号码</label>
                                <div class="layui-input-inline backcolor">
                                    <el-input v-model="regData.REGHANDLERCARDNO"></el-input>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline" style="width:575px;margin-right:0px;">
                                <label class="layui-form-label">详细地址</label>
                                <div class="layui-input-inline backcolor">
                                    <el-input class="longertext" :autosize="{ minRows: 2, maxRows: 8}" placeholder="请输入详细地址" v-model="regData.REGHANDLERHOUSEHOLD">
                                    </el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">联系电话</label>
                                <div class="layui-input-inline backcolor">
                                    <el-input v-model="regData.REGHANDLERLINK"></el-input>
                                    <div v-if="!onshow" class="triangle_border_up"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">逝者关系</label>
                                   <div class="layui-input-inline backcolor">
                                        <el-select v-model="regData.REGRELATION" editable="true" filterable allow-create default-first-option placeholder="请选择逝者关系">
                                            <el-option v-for="item in REGRELATIONOptions" :key="item.value" :label="item.label" :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </div>
                            </div>
                            <!-- </div>
              <div class="layui-form-item"> -->
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="layui-form-item btnCenter">
                <el-button @click="closeDialog">取消</el-button>
                <el-button type="primary" @click="submit" :loading="this.$store.state.isloading">保存</el-button>
            </div>
        </sweet-modal>
        <!-- 编辑 -->
        <sweet-modal v-else="!hidden" ref="dialog" class="dialog" :sweetModalMaxWidth="pageWidth" v-bind:blocking="true">
            <h3>{{title}}</h3>
            <el-button type="primary" @click="readDead">读取逝者身份证</el-button>
            <el-button type="success" @click="readAgent">读取经办人身份证</el-button>
            <el-button v-if="checklianban" type="primary" @click="identityNumberBlur(regData.REGCARDNO)">匹配联办数据</el-button>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;">
                <fieldset class="layui-elem-field layui-field-title" v-if="this.isshowSource">
                    <legend>联办标记</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">参保月份</label>
                            <div class="layui-input-inline backcolorred">
                                <el-input v-model="regData.REGSOCIALYEAR" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">是否冻结</label>
                            <div class="layui-input-inline backcolorred">
                                <el-input v-model="regData.REGFROZEN" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">是否联办</label>
                            <div class="layui-input-inline backcolorred">
                                <el-select v-model="regData.REGISUSEJOINT">
                                    <el-option label="是" value="B"> </el-option>
                                    <el-option label="否" value="A"> </el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="jbifm" />&nbsp;死者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label text-danger">逝者类型</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGBONETYPE" :disabled="noshow" @change="getdeadtype">
                                    <el-option v-for="item in szlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" :disabled="item.disabled">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">到馆时间</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="datetime" v-model="regDataEexend.regDataTime" format="yyyy-MM-dd HH:mm"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGSEX" filterable>
                                    <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCARDTYPE" filterable>
                                    <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline backcolor ywbackcolor">
                                <el-input v-model="regData.REGNAME"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline backcolor">
                                <el-input v-model="regData.REGCARDNO"  @blur="identityNumberBlur(regData.REGCARDNO)" @change="(value) => identityNumber(value)"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline backcolor">
                                <el-input class="longertext" placeholder="请输入内容" v-model="regData.REGDETAILADDRESS">
                                </el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date v-model="regDataEexend.RegBirthDate" type="date" @change="(value) => birthdaydata(value)"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者年龄</label>
                            <div class="layui-input-inline backcolor">
                                <el-input-number v-model="regData.REGAGE" :min="0"></el-input-number>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡原因</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="cause" v-model="cauinfos" filterable>
                                </el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" v-model="regDataEexend.regDeathDate" format="yyyy-MM-dd"></el-date-picker>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">火化日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" placeholder="选择日期时间" v-model="regDataEexend.regCremationDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!this.isshowdaynum">
                            <!-- isshowdaynum -->
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowdaynum">
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">民族</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGNATION">
                                    <el-option v-for="item in mz" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isshow">
                            <label class="layui-form-label">户籍类别</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGHOUSEHOLDTYPE">
                                    <el-option v-for="item in hjlblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div v-if="!this.isDefaulthjdz" class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">地址类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGHOUSETYPE" @change="adresstypechange($event)">
                                    <el-option v-for="item in adresstype" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">户籍地址</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="household" change-on-select v-model="ctyLists" filterable :show-all-levels="false">
                                </el-cascader>
                            </div>
                        </div>
                        <!-- <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">统计地点</label>
                            <div class="layui-input-inline backcolor ywbackcolor">
                                <el-cascader :options="area" v-model="carryArea" filterable change-on-select :show-all-levels="false"></el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.syYdhh">
                            <label class="layui-form-label">火化殡仪馆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSUBFUNERAL"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowCreBy_YW">
                            <label class="layui-form-label" style="text-align:center;padding:0;">是否出具死亡证明</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISPOD" readonly></el-input>
                            </div>
                        </div>
                    </div>
                    <fieldset class="layui-elem-field layui-field-title">
                        <legend>
                            <icon-svg icon-class="qinren" />&nbsp;家属信息</legend>
                        <div class="layui-field-box">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">家属性别</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-select v-model="regData.REGHANDSEX" filterable>
                                            <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">证件类型</label>
                                    <div class="layui-input-inline">
                                        <el-select v-model="regData.REGHANDLERCARDTYPE" filterable>
                                            <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">家属姓名</label>
                                    <div class="layui-input-inline backcolor ywbackcolor">
                                        <el-input v-model="regData.REGHANDLERNAME"></el-input>
                                        <div class="triangle_border_up"></div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">证件号码</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input v-model="regData.REGHANDLERCARDNO"></el-input>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline" style="width:575px;margin-right:30px;">
                                    <label class="layui-form-label">详细地址</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input class="longertext" :autosize="{ minRows: 2, maxRows: 8}" placeholder="请输入详细地址" v-model="regData.REGHANDLERHOUSEHOLD">
                                        </el-input>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">联系电话</label>
                                    <div class="layui-input-inline backcolor ywbackcolor">
                                        <el-input v-model="regData.REGHANDLERLINK"></el-input>
                                        <div class="triangle_border_up"></div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">逝者关系</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-select v-model="regData.REGRELATION" editable="true" filterable allow-create default-first-option placeholder="请选择逝者关系">
                                            <el-option v-for="item in REGRELATIONOptions" :key="item.value" :label="item.label" :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="huohuaxinxi" />&nbsp;火化信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">减免类型</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGISKEYPOINT" :disabled="ischeck">
                                    <el-option v-for="item in jmlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="issee">
                            <label class="layui-form-label">减免证号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGREDCARDNO" style="width:150px"></el-input>
                            </div>
                        </div>
                         <div class="layui-inline"  v-if="Isshowcz">
                            <label class="layui-form-label" >财政归属</label>
                            <div class="layui-input-inline backcolor ywbackcolor">
                                <el-cascader :options="area" v-model="carryCai" filterable :show-all-levels="false"></el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">骨灰去向</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGGHQX" @change="isShowght($event)">
                                    <el-option :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" v-for="item in ghqx"></el-option>
                                </el-select>
                                <div class="triangle_border_up" v-if="this.isshowghqx != 'noshowghqx'"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IshaoNB">
                            <label class="layui-form-label">炉号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCRESERIALNUMBER"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata" filterable clearable @change="carchange">
                                </el-cascader>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">驾驶员</label>
                            <div class="layui-input-inline">
                                <el-select v-model="cdhdata.CDHDRIVER" filterable>
                                    <el-option v-for="item in drivers" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">出车里程</label>
                            <div class="layui-input-inline">
                                <el-input-number v-model="cdhdata.CDHMILEAGE" :min="0" style="width:150px"></el-input-number>公里
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="Isshowjyy">
                            <label class="layui-form-label">接运员</label>
                            <div class="layui-input-inline">
                                <el-select v-model="collectMember" placeholder="接运员" multiple :multiple-limit=2>
                                <el-option v-for="item in carriers" :key="item.value" :label="item.label" :value="item.value"></el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCYADDRESS" @visible-change="selectAddr" placeholder="请选择常用接尸地址">
                                    <el-option v-for="item in commonAddr" :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue"></el-option>
                                </el-select>
                            </div>
                            <div class="layui-input-inline backcolor" style="width:600px">
                                <el-input v-model="regData.REGADDRESS" style="width:600px"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <!-- 级联式下拉框 -->
                            <div class="layui-input-inline" style="width:288px">
                                <el-cascader class="dz" ref="address" v-model="arr" style="width:288px" :options="addressOptions" change-on-select @change="selectAddr">
                                </el-cascader>
                            </div>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGADDRESS" style="width:500px"></el-input>
                            </div>
                        </div>
                        <!-- 嵊州送客 -->
                        <div class="layui-inline" v-if="IsShowPoliteCar">
                            <label class="layui-form-label">送客车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata3" filterable clearable>
                                </el-cascader>
                            </div>
                        </div>
                        <!-- 嵊州送客 -->
                        <div class="layui-inline" v-if="IsShowPoliteMileage">
                            <label class="layui-form-label">送客里程</label>
                            <div class="layui-input-inline">
                                <el-input-number v-model="PoliteCdh.CDHMILEAGE" :min="0" style="width:150px"></el-input-number>公里
                            </div>
                        </div>
                        <!-- 嵊州送客 -->
                        <div class="layui-inline" v-if="IsShowOnCheckCrema">
                            <label class="layui-form-label">未结账火化</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGISONCHECKCREMA" filterable>
                                    <el-option v-for="item in icestatus" :key="item.label" :label="item.value" :value="item.label"></el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- 嵊州送客 -->
                        <div class="layui-inline" v-if="IsShowKeptSign">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGISCODE" filterable @change="clear">
                                    <el-option v-for="item in icestatus" :key="item.label" :label="item.value" :value="item.label"></el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <!-- 嵊州 -->
                        <div class="layui-inline" v-if="IsShowKeptSign">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.ICEID" :disabled="!(regData.REGISCODE=='B'&&IsShowKeptSign)" filterable>
                                    <!-- 存储冰柜号icenum -->
                                    <el-option v-for="item in icenum" :key="item.ICEID" :label="item.ICENAME" :value="item.ICEID">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!--宁波的冷藏标志-->
                         <div class="layui-inline" v-if="this.IslenNB">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGISCODE" filterable  @change="clearnb">
                                    <el-option v-for="item in icestatus" :key="item.label" :label="item.value" :value="item.label"></el-option>
                                </el-select>
                            </div>
                        </div>
                             <!--宁波的冷藏-->
                        <div class="layui-inline" v-if="!this.isShowCharge && this.isshowxl && !IsShowKeptSign">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.ICEID" filterable>
                                    <!-- 存储冰柜号icenum -->
                                    <el-option v-for="item in icenum" :key="item.ICEID" :label="item.ICENAME" :value="item.ICEID">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="this.isShowCharge || !this.isshowxl">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.ICENO" readonly></el-input>
                            </div>
                        </div>

                        <div class="layui-inline" v-if="!showselect&&!IsxialaNB">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                        <!-- 新加下拉 -->
                        <div class="layui-inline" v-if="showselect||IsxialaNB">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFMEMID" ref="REFMEMID" @change="getDESC" filterable>
                                    <el-option label="不选择" :value="null"></el-option>
                                    <el-option v-for="item in Memorialhall" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                         <!-- 宁波新加火化炉类型 -->
                         <div class="layui-inline" v-if="IsshowNB">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCRETYPE" filterable>
                                    <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!--  -->
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFCRELEVEL" filterable>
                                    <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div v-if='!showselect' class="layui-inline">
                            <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                                <label class="layui-form-label">炉型</label>
                                <div class="layui-input-inline">
                                    <el-select v-model="regData.REGCRETYPE" filterable :disabled='!IsCremationOpenModify'>
                                        <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.PRPISCODE" filterable>
                                    <el-option v-for="item in icestatus" :key="item.label" :label="item.value" :value="item.label" :disabled="true"></el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">寄存期限</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                        <div v-if='!showselect&&!IsxialaNB' class="layui-inline">
                            <div class="layui-inline" v-if="!this.isshowltmanage || !this.isshowxl">
                                <label class="layui-form-label">灵堂号</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.LINNAME" readonly></el-input>
                                </div>
                            </div>
                        <div class="layui-inline" v-if="this.isshowltmanage && this.isshowxl">
                                <label class="layui-form-label">灵堂号</label>
                                <div class="layui-input-inline">
                                    <el-select v-model="regData.LINID">
                                        <el-option label="不选择" :value="null"></el-option>
                                        <el-option v-for="item in hallnumber" :key="item.value" :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                        </div>
                              <!-- 临海新加火化炉类型 -->
                         <div class="layui-inline" v-if="isshowhuo_lh">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCRETYPE" filterable>
                                    <el-option v-for="item in creTypes" :key="item.value" :label="item.label " :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- /// -->
                        <div class="layui-inline" v-if="IsxialaNB">
                            <label class="layui-form-label">炉子编号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFCREID" placeholder="请选择火化炉编号" style="width:100%">
                                    <el-option v-for="item in creNames" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>

                        <!-- 新加下拉 -->
                        <div class="layui-inline" v-if="showselect||IsxialaNB">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFLINID">
                                    <el-option label="不选择" :value="null"></el-option>
                                    <el-option v-for="item in hallnumber" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">送客车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata2" filterable clearable>
                                </el-cascader>
                            </div>
                        </div>
                        <!--  -->
                        <div class="layui-inline" v-if="isshowght && this.isGut && this.isshowghts">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                            <el-cascader :options="columbarium" v-model="GuHuiArea" filterable></el-cascader>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="!this.isGut">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                                <el-input v-model="ASSNAMEDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isshowght && this.isGut && this.isshowghts && IsShowRegcreurn">
                            <label class="layui-form-label">骨灰盒</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCREURN"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowgetbodytime">
                            <label class="layui-form-label">出车日期</label>
                            <div class="layui-input-inline chooseTime">
                                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="cdhdata.CDHACTUALDATE"></el-date-picker>
                                <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="cdhdata.CDHACTUALTIME" format='HH:mm'></el-time-picker>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline" style="width:575px;margin-right:0px;">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-inline">
                                <el-input type="textarea" class="longertext" v-model="regData.REGREMARK"></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title" v-if="this.IsShowCreBy_YW">
                    <legend>内勤信息</legend>
                    <div :style="{maxHeight:maxHeights+'px'}" style="overflow:auto;">
                        <table class="layui-table" style="border-spacing: 0;">
                            <colgroup>
                                <col>
                                <col>
                                <col>
                                <col>
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>类型</th>
                                    <th>处理时间</th>
                                    <th>内勤备注</th>
                                    <!-- <th>操作</th> -->
                                </tr>
                            </thead>
                            <tbody v-if="this.isshowtable">
                                <tr class="allRow" style="text-align:center;">
                                    <td colspan="3">暂无数据</td>
                                </tr>
                            </tbody>
                            <tbody ref='inputs' v-if="!this.isshowtable">
                                <tr class="allRow" v-for="(chls,index) in chlLists">
                                    <td>
                                        <el-input v-model="chls.OFFCODNAME" readonly></el-input>
                                    </td>
                                    <td>
                                        <div class="layui-input-inline chooseTime">
                                            <el-date-picker v-model="cdhActualDateTime" readonly></el-date-picker>
                                        </div>
                                    </td>
                                    <td>
                                        <el-input v-model="chls.OFFDESC" readonly></el-input>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </fieldset>
            </div>
            <div class="layui-form-item btnCenter">
                <el-button type="warning" @click="closeDialog">取消</el-button>
                <el-button type="primary" @click="submit" :loading="this.$store.state.isloading">保存</el-button>
            </div>
        </sweet-modal>

        <!-- 新加详情页面  gy-->
        <sweet-modal ref="dialogdetail" class="dialog" :sweetModalMaxWidth="pageWidth" v-bind:blocking="true">
            <h3>{{title}}</h3>
            <el-button type="primary" @click="readDead">读取逝者身份证</el-button>
            <el-button type="success" @click="readAgent">读取经办人身份证</el-button>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;">
                <fieldset class="layui-elem-field layui-field-title" v-if="this.isshowSource">
                    <legend>联办标记</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">参保月份</label>
                            <div class="layui-input-inline backcolorred">
                                <el-input v-model="regData.REGSOCIALYEAR" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">是否冻结</label>
                            <div class="layui-input-inline backcolorred">
                                <el-input v-model="regData.REGFROZEN" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">是否联办</label>
                            <div class="layui-input-inline backcolorred">
                                <el-select v-model="regData.REGISUSEJOINT" disabled>
                                    <el-option label="是" value="B"> </el-option>
                                    <el-option label="否" value="A"> </el-option>
                                </el-select>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="jbifm" />&nbsp;死者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label ">逝者类型</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGBONETYPE" disabled>
                                    <el-option v-for="item in szlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" :disabled="item.disabled">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">到馆时间</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="datetime" v-model="regDataEexend.regDataTime" format="yyyy-MM-dd HH:mm" disabled></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGSEX" filterable disabled>
                                    <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCARDTYPE" filterable disabled>
                                    <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline backcolor">
                                <el-input v-model="regData.REGNAME" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline backcolor">
                                <el-input v-model="regData.REGCARDNO" @blur="identityNumberBlur(regData.REGCARDNO)" @change="(value) => identityNumber(value)" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline backcolor">
                                <el-input class="longertext" v-model="regData.REGDETAILADDRESS" disabled>
                                </el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date v-model="regDataEexend.RegBirthDate" type="date" @change="(value) => birthdaydata(value)" disabled></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者年龄</label>
                            <div class="layui-input-inline backcolor">
                                <el-input-number v-model="regData.REGAGE" :min="0" disabled></el-input-number>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡原因</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="cause" v-model="cauinfos" filterable disabled>
                                </el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" v-model="regDataEexend.regDeathDate" format="yyyy-MM-dd" disabled></el-date-picker>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">火化日期</label>
                            <div class="layui-input-inline backcolor">
                                <el-date-picker v-date type="date" v-model="regDataEexend.regCremationDate" disabled></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!this.isshowdaynum">
                            <!-- isshowdaynum -->
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowdaynum">
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" :min="0" disabled></el-input>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">民族</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGNATION" disabled>
                                    <el-option v-for="item in mz" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isshow">
                            <label class="layui-form-label">户籍类别</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGHOUSEHOLDTYPE" disabled>
                                    <el-option v-for="item in hjlblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div v-if="!this.isDefaulthjdz" class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">地址类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGHOUSETYPE" @change="adresstypechange($event)" disabled>
                                    <el-option v-for="item in adresstype" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">户籍地址</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="household" change-on-select v-model="ctyLists" filterable :show-all-levels="false" disabled>
                                </el-cascader>
                            </div>
                        </div>
                        <!-- <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">统计地点</label>
                            <div class="layui-input-inline backcolor">
                                <el-cascader :options="area" v-model="carryArea" filterable :show-all-levels="false" disabled></el-cascader>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.syYdhh">
                            <label class="layui-form-label">火化殡仪馆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSUBFUNERAL" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowCreBy_YW">
                            <label class="layui-form-label" style="text-align:center;padding:0;">是否出具死亡证明</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISPOD" disabled></el-input>
                            </div>
                        </div>
                    </div>
                    <fieldset class="layui-elem-field layui-field-title">
                        <legend>
                            <icon-svg icon-class="qinren" />&nbsp;家属信息</legend>
                        <div class="layui-field-box">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">家属性别</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-select v-model="regData.REGHANDSEX" filterable disabled>
                                            <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">证件类型</label>
                                    <div class="layui-input-inline">
                                        <el-select v-model="regData.REGHANDLERCARDTYPE" filterable disabled>
                                            <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">家属姓名</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input v-model="regData.REGHANDLERNAME" disabled></el-input>
                                        <div class="triangle_border_up"></div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">证件号码</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input v-model="regData.REGHANDLERCARDNO" disabled></el-input>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline" style="width:575px;margin-right:30px;">
                                    <label class="layui-form-label">详细地址</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input class="longertext" :autosize="{ minRows: 2, maxRows: 8}" v-model="regData.REGHANDLERHOUSEHOLD" disabled>
                                        </el-input>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">联系电话</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-input v-model="regData.REGHANDLERLINK" disabled></el-input>
                                        <div class="triangle_border_up"></div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">逝者关系</label>
                                    <div class="layui-input-inline backcolor">
                                        <el-select v-model="regData.REGRELATION" editable="true" filterable allow-create default-first-option disabled>
                                            <el-option v-for="item in REGRELATIONOptions" :key="item.value" :label="item.label" :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </div>
                                </div>
                                <!-- </div>
              <div class="layui-form-item"> -->
                            </div>
                        </div>
                    </fieldset>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="huohuaxinxi" />&nbsp;火化信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">减免类型</label>
                            <div class="layui-input-inline backcolor">
                                <el-select v-model="regData.REGISKEYPOINT" disabled>
                                    <el-option v-for="item in jmlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="issee">
                            <label class="layui-form-label">减免证号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGREDCARDNO" style="width:150px" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">骨灰去向</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGGHQX" @change="isShowght($event)" disabled>
                                    <el-option :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME" v-for="item in ghqx"></el-option>
                                </el-select>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
                            <label class="layui-form-label">服务方式</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGYITIQX">
                                <el-option :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue" v-for="item in serviceListType"></el-option>
                                </el-select>
                            </div>
                            </div> -->
                            <!-- </div>
                        <div class="layui-form-item"> -->
                        <div class="layui-inline" v-if="this.IshaoNB">
                            <label class="layui-form-label">炉号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCRESERIALNUMBER" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata" filterable clearable @change="carchange" disabled>
                                </el-cascader>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">驾驶员</label>
                            <div class="layui-input-inline">
                                <el-select v-model="cdhdata.CDHDRIVER" disabled>
                                    <el-option v-for="item in drivers" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">出车里程</label>
                            <div class="layui-input-inline">
                                <el-input-number v-model="cdhdata.CDHMILEAGE" :min="0" style="width:150px" disabled></el-input-number>公里
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                         <div class="layui-inline" v-if="Isshowjyy">
                            <label class="layui-form-label">接运员</label>
                            <div class="layui-input-inline">
                                <el-input v-model="carriersinfo" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCYADDRESS" @visible-change="selectAddr" disabled>
                                    <el-option v-for="item in commonAddr" :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue"></el-option>
                                </el-select>
                            </div>
                            <div class="layui-input-inline backcolor" style="width:600px">
                                <el-input v-model="regData.REGADDRESS" style="width:600px" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isaddress">
                            <label class="layui-form-label">接尸地点</label>
                            <!-- 级联式下拉框 -->
                            <div class="layui-input-inline" style="width:288px">
                                <el-cascader class="dz" ref="address" v-model="arr" style="width:288px" :options="addressOptions" change-on-select @change="selectAddr" disabled>
                                </el-cascader>
                            </div>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGADDRESS" style="width:500px"></el-input>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <!-- 能修改的 -->
                        <!-- <div class="layui-inline" v-if="!this.isShowCharge">
              <label class="layui-form-label">冰柜号</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.ICENO"></el-input>
              </div>
            </div> -->
                        <div class="layui-inline" v-if="!this.isShowCharge && this.isshowxl">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.ICEID" filterable disabled>
                                    <!-- 存储冰柜号icenum -->
                                    <el-option v-for="item in icenum" :key="item.ICEID" :label="item.ICENAME" :value="item.ICEID">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="this.isShowCharge || !this.isshowxl">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.ICENO" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" disabled></el-input>
                            </div>
                        </div>
                         <!-- 宁波新加火化炉详情 -->
                         <div class="layui-inline" v-if="IsshowNB">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                 <el-input v-model="regData.REGCRETYPEDESC" disabled></el-input>
                            </div>
                        </div>
                        <!-- /// -->
                        
                            <!-- 临海新加火化炉详情 -->
                         <div class="layui-inline" v-if="isshowhuo_lh">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                 <el-input v-model="regData.REGCRETYPEDESC" disabled></el-input>
                            </div>
                        </div>
                        <!-- /// -->
                        <!-- <div class="layui-inline" v-if="this.IsShowCreBy_YW">
              <label class="layui-form-label">炉号1</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.MEMNAME" readonly></el-input>
              </div>
            </div> -->
                        <!-- <div class="layui-inline" v-if="this.IsShowCreBy_YW">
              <label class="layui-form-label">炉型</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.PRPCREMATION" readonly></el-input>
              </div>
            </div> -->
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCRETYPE" filterable disabled>
                                    <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsxialaNB">
                            <label class="layui-form-label">炉子编号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFCREID" placeholder="请选择火化炉编号" style="width:100%">
                                    <el-option v-for="item in creNames" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.PRPISCODE" filterable disabled>
                                    <el-option v-for="item in icestatus" :key="item.label" :label="item.value" :value="item.label" :disabled="true"></el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">寄存期限</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!this.isshowltmanage || !this.isshowxl">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.LINNAME" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowltmanage && this.isshowxl">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.LINID" disabled>
                                    <el-option label="不选择" :value="null"></el-option>
                                    <el-option v-for="item in hallnumber" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isshowght && this.isGut && this.isshowghts">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                            <el-cascader :options="columbarium" v-model="GuHuiArea" filterable></el-cascader>
                            </div>
                        </div>
                        <!-- 不能修改的 -->
                        <div class="layui-inline" v-if="!this.isGut">
                            <label class="layui-form-label">骨灰堂</label>
                            <div class="layui-input-inline">
                                <el-input v-model="ASSNAMEDESC" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="isshowght && this.isGut && this.isshowghts && IsShowRegcreurn">
                            <label class="layui-form-label">骨灰盒</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCREURN" disabled></el-input>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
              <label class="layui-form-label">出车日期</label>
              <div class="layui-input-inline">
                <el-date-picker v-date type="datetime" v-model="regDataEexend.regDataTime" format="yyyy-MM-dd HH:mm"></el-date-picker>
              </div>
            </div> -->
                        <div class="layui-inline" v-if="this.isshowgetbodytime">
                            <label class="layui-form-label">出车日期</label>
                            <div class="layui-input-inline chooseTime">
                                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="cdhdata.CDHACTUALDATE" disabled></el-date-picker>
                                <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="cdhdata.CDHACTUALTIME" format='HH:mm' disabled></el-time-picker>
                            </div>
                        </div>
                    </div>

                    <!-- <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">接尸地点</label>
              <div class="layui-input-inline">
                <el-select v-model="regData.REGCYADDRESS" @change="selectAddr" placeholder="请选择常用接尸地址">
                  <el-option :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue" v-for="item in commonAddr"></el-option>
                </el-select>
              
              </div>
              <div class="layui-input-inline">
                <el-input v-model="regData.REGADDRESS" style="width:570px"></el-input>
              </div>
            </div>
          </div> -->

                    <div class="layui-form-item">
                        <div class="layui-inline" style="width:575px;margin-right:0px;">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-inline">
                                <el-input type="textarea" class="longertext" v-model="regData.REGREMARK" disabled></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title" v-if="this.IsShowCreBy_YW">
                    <legend>内勤信息</legend>
                    <div :style="{maxHeight:maxHeights+'px'}" style="overflow:auto;">
                        <table class="layui-table" style="border-spacing: 0;">
                            <colgroup>
                                <col>
                                <col>
                                <col>
                                <col>
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>类型</th>
                                    <th>处理时间</th>
                                    <th>内勤备注</th>
                                    <!-- <th>操作</th> -->
                                </tr>
                            </thead>
                            <tbody v-if="this.isshowtable">
                                <tr class="allRow" style="text-align:center;">
                                    <td colspan="3">暂无数据</td>
                                </tr>
                            </tbody>
                            <tbody ref='inputs' v-if="!this.isshowtable">
                                <tr class="allRow" v-for="(chls,index) in chlLists">
                                    <td>
                                        <el-input v-model="chls.OFFCODNAME" readonly></el-input>
                                    </td>
                                    <td>
                                        <div class="layui-input-inline chooseTime">
                                            <el-date-picker v-model="cdhActualDateTime" readonly></el-date-picker>
                                        </div>
                                    </td>
                                    <td>
                                        <el-input v-model="chls.OFFDESC" readonly></el-input>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </fieldset>
            </div>
            <div class="layui-form-item btnCenter">
                <el-button @click="closedetail">取消</el-button>
            </div>
        </sweet-modal>

        <!-- 详情 -->
        <sweet-modal v-if="hidden" ref="dialogInfo" class="dialog" :sweetModalMaxWidth="pageWidth" v-bind:blocking="true">
            <h3>{{title}}</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 0px;">
                    <legend>
                        <icon-svg icon-class="jbifm" />&nbsp;死者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGNAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSEXDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">民族</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGNATION" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.RegBirthDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者年龄</label>
                            <div class="layui-input-inline">
                                <el-input readonly v-model="regData.REGAGE"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCARDTYPE" readonly></el-input>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCARDNO" readonly></el-input>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
              <label class="layui-form-label">户籍类别</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.REGHOUSEHOLDTYPE" readonly></el-input>
              </div>
            </div> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">户籍地址</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGHOUSEHOLDDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGBONETYPE2" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡原因</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCAUSADESC" readonly></el-input>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" readonly v-model="regData.REGDETAILADDRESS">
                                </el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.regDeathDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">到馆时间</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="datetime" v-model="regDateTimeInfo" format="yyyy-MM-dd HH:mm" readonly></el-date-picker>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">火化日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.regCremationDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" readonly></el-input>
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <!-- <div class="layui-inline">
              <label class="layui-form-label">户籍地址</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.REGHOUSEHOLDDESC" readonly></el-input>
              </div>
            </div> -->
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">统计地址</label>
                            <div class="layui-input-inline">
                                <el-input v-model="addressInfo" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.syYdhh">
                            <label class="layui-form-label">火化殡仪馆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSUBFUNERAL" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowCreBy_YW">
                            <label class="layui-form-label" style="text-align:center;padding:0;">是否出具死亡证明</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISPOD" readonly></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="huohuaxinxi" />&nbsp;火化信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">减免类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISKEYPOINTDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">骨灰去向</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGGHQXDESC" readonly></el-input>
                            </div>
                        </div>
                        <!-- <div class="layui-inline">
              <label class="layui-form-label">服务方式</label>
              <div class="layui-input-inline">
                <el-input v-model="regData.REGYITIQXDESC" readonly></el-input>
              </div>
            </div> -->
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸车辆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.CARLIC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">驾驶员</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.STANAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">里程数</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.CDHMILEAGE" :min="0" style="width:150px" readonly></el-input>公里
                            </div>
                        </div>
                        <!-- </div>
              <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸地点</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" v-model="carryAreaInfo" readonly></el-input>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.ICENO" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.LINNAME" readonly></el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline" style="width:575px;margin-right:0px;">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-inline">
                                <el-input type="textarea" class="longertext" v-model="regData.REGREMARK" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowgetbodytime">
                            <label class="layui-form-label">出车日期</label>
                            <div class="layui-input-inline chooseTime">
                                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="cdhdata.CDHACTUALDATE" readonly></el-date-picker>
                                <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="cdhdata.CDHACTUALTIME" format='HH:mm' readonly></el-time-picker>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="qinren" />&nbsp;家属信息</legend>
                    <div class="layui-field-box">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">家属姓名</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERNAME" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">家属性别</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDSEXDESC" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">证件号码</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERCARDNO" readonly></el-input>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">详细地址</label>
                                <div class="layui-input-inline">
                                    <el-input class="longertext" :autosize="{ minRows: 2, maxRows: 4}" readonly v-model="regData.REGHANDLERHOUSEHOLD">
                                    </el-input>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">

                            <div class="layui-inline">
                                <label class="layui-form-label">联系电话</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERLINK" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">逝者关系</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGRELATION" readonly></el-input>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="layui-form-item btnCenter sweet-btn">
                <el-button @click="closeDialog">取消</el-button>
                <!-- <el-button v-if="this.$store.state.REGCURSTATUSDESC === '在馆内'" type="primary" @click="ptcrf($store.state.PTCRFCHDID)">打印火化登记表</el-button> -->
            </div>
        </sweet-modal>
        <!-- 详情 -->
        <sweet-modal v-else="!hidden" ref="dialogInfo" class="dialog" :sweetModalMaxWidth="pageWidth" v-bind:blocking="true">
            <h3>{{title}}</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 0px;">
                    <legend>
                        <icon-svg icon-class="jbifm" />&nbsp;死者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGBONETYPE2" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">到馆时间</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="datetime" v-model="regDateTimeInfo" format="yyyy-MM-dd HH:mm" readonly></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCARDTYPE" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGNAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSEXDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCARDNO" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" readonly v-model="regData.REGDETAILADDRESS">
                                </el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.RegBirthDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.regDeathDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者年龄</label>
                            <div class="layui-input-inline">
                                <el-input readonly v-model="regData.REGAGE"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">死亡原因</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCAUSADESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">火化日期</label>
                            <div class="layui-input-inline">
                                <el-date-picker type="date" readonly v-model="regDataEexend.regCremationDate"></el-date-picker>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">排队序号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGDAYNUM" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">民族</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGNATION" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!isshow">
                            <label class="layui-form-label">户籍类别</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGHOUSEHOLDTYPE" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">地址类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGHOUSETYPE" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">户籍地址</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGHOUSEHOLDDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">统计地址</label>
                            <div class="layui-input-inline">
                                <el-input v-model="addressInfo" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.syYdhh">
                            <label class="layui-form-label">火化殡仪馆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGSUBFUNERAL" disabled></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowCreBy_YW">
                            <label class="layui-form-label" style="text-align:center;padding:0;">是否出具死亡证明</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISPOD" readonly></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="qinren" />&nbsp;家属信息</legend>
                    <div class="layui-field-box">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">家属姓名</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERNAME" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">家属性别</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDSEXDESC" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">证件号码</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERCARDNO" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">联系电话</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGHANDLERLINK" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">逝者关系</label>
                                <div class="layui-input-inline">
                                    <el-input v-model="regData.REGRELATION" readonly></el-input>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">详细地址</label>
                                <div class="layui-input-inline">
                                    <el-input class="longertext" :autosize="{ minRows: 2, maxRows: 4}" readonly v-model="regData.REGHANDLERHOUSEHOLD">
                                    </el-input>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <icon-svg icon-class="huohuaxinxi" />&nbsp;火化信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">减免类型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISKEYPOINTDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="Isshowcz">
                            <label class="layui-form-label">财政归属</label>
                            <div class="layui-input-inline">
                                <el-input v-model="caiInfo" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">骨灰去向</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGGHQXDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IshaoNB">
                            <label class="layui-form-label">炉号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCRESERIALNUMBER" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">接尸车辆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.CARLIC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">驾驶员</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.STANAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">里程数</label>
                            <div class="layui-input-inline">
                                <el-input v-model="cdhdata.CDHMILEAGE" :min="0" style="width:150px" readonly></el-input>公里
                            </div>
                        </div>
                         <div class="layui-inline" v-if="Isshowjyy">
                            <label class="layui-form-label">接运员</label>
                            <div class="layui-input-inline">
                                <el-input v-model="carriersinfo" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" style="width:595px;">
                            <label class="layui-form-label">接尸地点</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" v-model="carryAreaInfo" readonly></el-input>
                            </div>
                        </div>
                        <!-- 嵊州送客 -->
                        <div class="layui-inline" v-if="IsShowPoliteCar">
                            <label class="layui-form-label">送客车辆</label>
                            <div class="layui-input-inline">
                                <el-input v-model="PoliteCdh.CARLIC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowPoliteMileage">
                            <label class="layui-form-label">送客里程</label>
                            <div class="layui-input-inline">
                                <el-input v-model="PoliteCdh.CDHMILEAGE" style="width:150px" readonly></el-input>公里
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowOnCheckCrema">
                            <label class="layui-form-label">未结账火化</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISONCHECKCREMADESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsShowKeptSign" @change="clear">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGISCODEDESC" readonly></el-input>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                         <!--宁波的冷藏标志-->
                         <div class="layui-inline" v-if="this.IslenNB">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                            <el-input v-model="regData.REGISCODEDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">冰柜号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.ICENO" readonly></el-input>
                            </div>
                        </div>
                        <div v-if="!showselect" class="layui-inline">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                         <!-- 临海新加火化炉详情 -->
                         <div class="layui-inline" v-if="isshowhuo_lh">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                 <el-input v-model="regData.REGCRETYPEDESC" readonly></el-input>
                            </div>
                        </div>
                        <!-- /// -->

                        <!-- <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                        <label class="layui-form-label">炉号3</label>
                        <div class="layui-input-inline">
                            <el-input v-model="regData.MEMNAME" readonly></el-input>
                        </div>
                        </div> -->
                        <div class="layui-inline" v-if="!showselect?this.IsShowCreBy_YW:false">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.REGCRETYPEDESC" readonly></el-input>
                            </div>
                        </div>
                        <!-- 新加下拉 -->
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">悼念厅</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFMEMID" ref="REFMEMID" @change="getDESC" disabled>
                                    <el-option label="不选择" :value="null"></el-option>
                                    <el-option v-for="item in Memorialhall" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFCRELEVEL" filterable disabled>
                                    <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsxialaNB">
                            <label class="layui-form-label">炉子编号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFCREID" placeholder="请选择火化炉编号" style="width:100%">
                                    <el-option v-for="item in creNames" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <!-- 新加下拉 -->
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REFLINID" disabled>
                                    <el-option label="不选择" :value="null"></el-option>
                                    <el-option v-for="item in hallnumber" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
              
                        <div class="layui-inline" v-if="showselect">
                            <label class="layui-form-label">送客车辆</label>
                            <div class="layui-input-inline">
                                <el-cascader :options="carLics" v-model="cdhdataEexend.cardata2" filterable clearable @change="carchange" disabled>
                                </el-cascader>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">是否冷藏</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.PRPISCODE" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.IsShowCreBy_YW">
                            <label class="layui-form-label">寄存期限</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.MEMNAME" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="!showselect">
                            <label class="layui-form-label">灵堂号</label>
                            <div class="layui-input-inline">
                                <el-input v-model="regData.LINNAME" readonly></el-input>
                            </div>
                        </div>
                            <!-- 宁波新加火化炉详情 -->
                         <div class="layui-inline" v-if="IsshowNB">
                            <label class="layui-form-label">炉型</label>
                            <div class="layui-input-inline">
                                 <el-input v-model="regData.REGCRETYPEDESC" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="IsxialaNB">
                            <label class="layui-form-label">炉子编号</label>
                            <div class="layui-input-inline">
                                 <el-input v-model="regData.REFCREID" readonly></el-input>
                            </div>
                        </div>
                        <!-- /// -->
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline" style="width:575px;margin-right:0px;">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-inline">
                                <el-input type="textarea" class="longertext" v-model="regData.REGREMARK" readonly></el-input>
                            </div>
                        </div>
                        <div class="layui-inline" v-if="this.isshowgetbodytime">
                            <label class="layui-form-label">出车日期</label>
                            <div class="layui-input-inline chooseTime">
                                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="cdhdata.CDHACTUALDATE" readonly></el-date-picker>
                                <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="cdhdata.CDHACTUALTIME" format='HH:mm' readonly></el-time-picker>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="layui-form-item btnCenter sweet-btn">
                <el-button @click="closeDialog">取消</el-button>
                <!-- <el-button v-if="this.$store.state.REGCURSTATUSDESC === '在馆内'" type="primary" @click="ptcrf($store.state.PTCRFCHDID)">打印火化登记表</el-button> -->
            </div>
        </sweet-modal>
        <!-- 老数据推送 -->
        <sweet-modal ref="giveolddata" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>老数据推送</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;height:300px;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">条码</label>
                        <div class="layui-input-inline">
                            <el-input ref="siteInput" v-model="olddata" @change="giveolddatas($event)"></el-input>
                        </div>
                        <el-button @click="giveolddatas(olddata)">提交</el-button>
                    </div>
                </div>
            </div>
        </sweet-modal>
        <!-- 信息匹配-航飞数据 -->
        <sweet-modal ref="searchmessage" :class="colorclass==='20'?['dialog','lxgpro']:['dialog']" :sweetModalMaxWidth="700">
            <h3>信息匹配</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;height:350px;">
                <el-button type="primary" v-if="this.IsShowReadRegCardBtn" @click="readDeads">读取逝者身份证</el-button>
                <fieldset class="layui-elem-field layui-field-title" v-if="this.pushhfmode">
                    <legend>条码信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">条码</label>
                            <div class="layui-input-inline backcolors">
                                <el-input ref="siteInput" v-model="olddatas" @blur="getshizhename"></el-input>
                                <!-- <div style=" width: 0;height: 0;border: 10px solid;border-color: transparent transparent red;"></div> -->
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input ref="siteInput" v-model="shizhename" disabled></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>

                <fieldset class="layui-elem-field layui-field-title">
                    <legend>逝者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGSEX" filterable>
                                    <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCARDTYPE" filterable>
                                    <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input v-model="REGNAMES"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline backcolors">
                                <el-input v-model="REGCARDNOS" @change="(value) => identityNumber(value)"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" placeholder="请输入内容" v-model="REGDETAILADDRESSA">
                                </el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>

                <div class="layui-form-item btnCenter sweet-btn">
                    <el-button @click="searchmessages">匹配</el-button>
                </div>
            </div>
        </sweet-modal>
        <!-- 信息匹配-联办数据 -->
        <sweet-modal ref="lianbansearchmessage" :class="colorclass==='20'?['dialog','lxgpro']:['dialog']" :sweetModalMaxWidth="700">
            <h3>信息匹配</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;height:370px;">
                <el-button type="primary" v-if="this.IsShowReadRegCardBtn" @click="readDeadss">读取逝者身份证</el-button>
                <fieldset class="layui-elem-field layui-field-title" v-if="this.pushhfmode">
                    <legend>条码信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">条码</label>
                            <div class="layui-input-inline backcolors">
                                <!-- @blur="getBendiDeadName" -->
                                <el-input ref="siteInput" v-model="olddatas" @keydown.enter.native="getBendiDeadName"></el-input>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input ref="siteInput" v-model="shizhename" disabled></el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>

                <fieldset class="layui-elem-field layui-field-title">
                    <legend>逝者信息</legend>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者性别</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGSEX" filterable>
                                    <el-option v-for="item in xblx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件类型</label>
                            <div class="layui-input-inline">
                                <el-select v-model="regData.REGCARDTYPE" filterable>
                                    <el-option v-for="item in sfzjlx" :key="item.CODNAME" :label="item.CODALIAS" :value="item.CODNAME">
                                    </el-option>
                                </el-select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">逝者姓名</label>
                            <div class="layui-input-inline">
                                <el-input v-model="REGNAMES"></el-input>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号码</label>
                            <div class="layui-input-inline backcolors">
                                <el-input v-model="REGCARDNOS" @keydown.enter.native="getLianbanData"></el-input>
                                <div class="triangle_border_up"></div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">详细地址</label>
                            <div class="layui-input-inline">
                                <el-input class="longertext" placeholder="请输入内容" v-model="REGDETAILADDRESSA">
                                </el-input>
                            </div>
                        </div>
                    </div>
                </fieldset>
                <p v-if="warntextshow" style="font-size: 14px;color:red;margin-left:20px;">该联办数据以冻结，是否继续操作</p>

                <div class="layui-form-item btnCenter sweet-btn">
                    <el-button @click="searchmessagesLB">匹配</el-button>
                </div>
            </div>
        </sweet-modal>

        <!-- 快速登记 -->
        <sweet-modal ref="quickregistration" class="dialog" :sweetModalMaxWidth="680">
            <h3>快速登记</h3>
            <div :style="{maxHeight:maxHeight+'px'}" style="overflow:auto;height:300px;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">条形码</label>
                        <div class="layui-input-inline backcolor">
                            <el-input v-model="REGBARNO"></el-input>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item btnCenter sweet-btn">
                    <el-button @click="quickregistrations">匹配</el-button>
                </div>
            </div>
        </sweet-modal>
        <!-- 火化证明pdf-->
        <sweet-modal ref="dialog1" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>打印火化证明</h3>
            <iframe :src="pdfUrl" style="width:1150px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
        <!-- 业务流转单 -->
        <sweet-modal ref="dialog2" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>打印业务流转单</h3>
            <iframe :src="printUrl" style="width:1150px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
        <!-- 打印火化登记表 -->
        <sweet-modal ref="prints" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>火化登记表打印</h3>
            <iframe :src="printUrl" style="width:1100px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
        <!-- 打印联办单 -->
        <sweet-modal ref="printlb" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>联办单打印</h3>
            <iframe :src="printUrllb" style="width:1100px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
             <!-- 打印遗体出冰通知单 -->
        <sweet-modal ref="printsout" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>打印遗体出冰通知单</h3>
            <iframe :src="printUrl" style="width:1150px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
             <!-- 打印核对单 -->
        <sweet-modal ref="printscheckjicun" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>打印寄存核对单</h3>
            <iframe :src="printUrl" style="width:1150px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
        <sweet-modal ref="printscheckyewu" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>打印业务核对单</h3>
            <iframe :src="printUrlyewu" style="width:1150px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
        <checkout-add ref="checkadd" @refreshData="refreshData"></checkout-add>

        <div style="display: none;">
            <object classid="clsid:090457CB-DF21-41EB-84BB-39AAFC9E271A" id="ScanCtrl" codebase="*.cab#version=1,0,0,1" width="660" height="400">
            </object>
        </div>
        <object id="view1" type="application/x-eloamplugin" width="0" height="0" name="view" />
        <object id="thumb1" type="application/x-eloamplugin" width="0" height="0" name="thumb" />
    </div>
</template>
<style rel="stylesheet/scss" lang="scss" >
@import "src/styles/common.scss";
.el-button + .el-button {
    margin-left: 0;
}

.longtext {
    width: 480px;
}

.longertext {
    width: 495px;
}

.sweet-btn {
    margin-top: 20px;
}

.layui-form-label[data-v-7e4f8d8c] {
    width: 82px;
}

.lxgpro .sweet-content {
    background-color: rgb(148, 187, 219) !important;
    // color: white;
    // 52c5e7  rgb(148, 187, 219)
}
</style>

<script>
import { ORDER } from "@/const/orderConst.js";
import { JSONZU } from "@/const/orderConst.js";
import { Load, Unload, plugin } from "@/utils/scanCtrl.js";
import apiBase from "@/api/apiBase.js";
import {
    formatDate,
    timeStringToDate,
    dateStringToDate
} from "@/utils/date.js";
import sweetModal from "@/components/sweetModal";
import checkoutAdd from "./checkoutAdd";
import { codeValid } from "@/utils/IdentityCodeValid.js";
import scanWS from "@/utils/scanWebSocket.js";
import { MessageBox, Message } from "element-ui";
import { connects, InfoTextCallback } from "@/utils/OcxUtil.js";
import { textnum } from "@/utils/OcxUtil.js";
//2.3版本的良田高拍仪读取身份证信息
import openidentitycard from "@/utils/openIdentityCard.js";
//捷宇需要用到axios
import axios from 'axios'
const accesscode=typeof getaccesscode === "function" ? getaccesscode() : 'IEHlf6ROpiOyUCMko90HUzbZ7GrpejjAMimsbQ=='   //捷宇高拍仪需要更换的code码
window.onload = function() {
    // Load();
};
window.onunload = function() {
    Unload();
};
// Vue.directives('focus',{
//   inserted: function (el) {
//        el.focus();
//     }
// });
export default {
    name: "cresimplereg",
    props:{
    sid:{
      type:String,
      default: '0'
    }
    },
    data() {
        return {
            ASSNAMEDESC:null, //骨灰堂详情
            NEIREGID:null,
            iskuaisu:null, 
            checklianban:null, 
            noshow:false,
            onshow:null, //不显示家属信息红三角
            carriersinfo:'',  //在馆内 接运员详情
            collectMember:[], //接收接运员的值（宁波）
            carriers:[], //接运员的下拉选项（宁波）
            datalist:null, //捷宇高拍仪接收值
            Isshowcz:null, //是否显示财政归属下拉(宁波)
            Isshowjyy:null, //是否显示接运员下拉(宁波)
            IsshowNB:null, //是否显示火化炉类型(宁波)
            IslenNB:null, //是否显示冷藏标记(宁波)
            IsxialaNB:null, //是否显示悼念厅 灵堂号下拉 炉子编号(宁波)
            IshaoNB:null, //是否显示炉号(宁波)
            isshowhuo_lh:null, //是否显示火化炉类型(临海)
            issee: true, //是否显示户籍类别(舟山)
            isshow: true, //是否显示户籍类别(舟山)
            addressOptions: [], //地址选项
            arr: [], //地址
            isAdd: true, //接收返回的值判断地址选择类型
            isaddress: false,
            // 兰溪馆弹出框颜色
            colorclass: null,
            id: null,
            regids: null,
            REGNAMES: null,
            REGCARDNOS: null, //身份证号码
            REGBARNO: null, //条形码
            REGDETAILADDRESSA: null,
            olddata: null,
            //数据匹配的条码
            olddatas: null,
            //数据匹配的逝者姓名
            shizhename: null,
            //结账状态
            REGISCHECK: null,
            chdids: null,
            //是否显示骨灰堂
            isshowght: false,
            //个性化萧山显示骨灰堂
            isGut: null,
            //个性化（是否可以修改排队序号）
            isshowdaynum: null,
            //个性化（是否显示接尸时间）
            isshowgetbodytime: null,
            //个性化（是否推送灵堂信息）
            isshowltmanage: null,
            //个性化（是否把接尸地点的数据源换成统计地点的数据源）
            showselect: null, // 舟山新加是否显示悼念厅和灵堂和送客车辆下拉
            ischangedata: null,
            //是否显示参保月数和是否冻结
            isshowSource: false,
            isShowCharge: true,
            isshowghts: true,
            isshowtable: null,
            ischeck: null,
            IsShowCreBy_YW: null, //是否显示义乌内勤信息
            CauseOfDeath: null,
            WhereaboutsOfAsh: null,
            showtongji: null, //是否默认统计地点
            IsRegSendUse: null, //正式登记是否推送内勤使用
            pdfUrl: null,
            printUrl: null,
            printUrlyewu: null,
            printUrllb: null,
            pushhfmode: null, //控制快速登记中的条形码
            warntextshow: false, //快速登记提示文字是否显示
            IsShowCarrier: null, //火化登记是否显示接运员(嵊州)
            IsShowKeptSign: null, //火化登记是否显示冷藏标志(嵊州)
            IsShowOnCheckCrema: null, //火化登记是否显示未结账火化(嵊州)
            IsShowPoliteCar: null, //火化登记是否显示送客车辆(嵊州)
            IsShowPoliteMileage: null, //火化登记是否显示送客里程(嵊州)
            //户籍所在地
            title: null,
            order: null,
            pageWidth: 1350,
            maxHeight: 550,
            maxHeights: 200,
            ctyLists: [],
            ctyInfo: null,
            regDateTimeInfo: null,
            commonArea: null,
            chlLists: [],
            //编码类型
            commonAddr: [],
            area: [],
            carryArea: [],
            GuHuiArea: [],
            carryCai: [], //财政归属
            jsdata: [],
            household: [],
            causList: [],
            codeList: [],
            cause: [],
            cauinfos: [],
            szlx: [],
            szlx_backup: [],
            ytqx: [],
            ghqx: [],
            xblx: [],
            icenum: [],
            columbarium: [],
            sfzjlx: [],
            gjlb: [],
            mz: [],
            whcdlx: [],
            hyzklx: [],
            zylx: [],
            zzmmlx: [],
            hjlblx: [],
            hjszdlx: [],
            jmlx: [],
            czgs: [], //宁波个性化 新加财政归属 
            carLics: [],
            hallnumber: [],
            Memorialhall: [], ///新加悼念厅
            Cremahall: [], ///新加火化炉
            icelist: [],
            creTypes: [],
            creNames: [], //炉子编号接收值
            serviceListType: [],
            drivers: [],
            hhldata: [],
            ctydata: null,
            IsShowReadRegCardBtn: null,
            IsCremationOpenModify: null,
            adresstype: [
                { CODNAME: "国内", CODALIAS: "国内" },
                { CODNAME: "其他", CODALIAS: "其他" }
            ],
            addressInfo: null,
            caiInfo: null,  // 宁波财政归属 详情
            REGLBPRPID: '',
            regData: {
                REFMEMID: null,
                MEMNAMEDESC: null,
                REFLINID: null,
                REFCREID: null,
                LINNAMEDESC: null,
                CARIDDESC: null,
                CARCARLICDESC: null,
                REFCRELEVEL: null,
                REGREDCARDNO: null,

                REGISUSEJOINT: "B",
                REGCYADDRESS: null,
                COPYREGID: null,
                REGID: null,
                REGLBPRPID:'',
                REGPRPID: null,
                REGDATE: null,
                REGTIME: null,
                REGDAYNUM: null,
                REGBONETYPE: null,
                REGCAUSA: null,
                REGCAUSASON: null,
                REGDEATHID: null,
                REGREGPROVEUNIT: null,
                REGADDRESS: null,
                REGDEATHADDRESS: null,
                REGYITIQX: null,
                REGGHQX: null,
                REGNAME: null,
                REGSEX: null,
                REGAGE: null,
                REGCARDTYPE: null,
                REGCARDNO: "",
                REGBIRTHDATE: null,
                REGNATIONALITYTYPE: null,
                REGNATION: null,
                REGCULTURALDEGREE: null,
                REGMARRIAGE: null,
                REGJOB: null,
                REGPOLITICAL: null,
                REGHOUSEHOLDTYPE: null,
                REGHOUSETYPE: null,
                REGHOUSEHOLD: null,
                REGDETAILADDRESS: null,
                REGDEATHDATE: null,
                REGISKEYPOINT: null,
                REGHANDLERNAME: null,
                REGHANDSEX: null,
                REGISPOD: null,
                REGHANDLERCARDTYPE: null,
                REGHANDLERCARDNO: "",
                REGHANDLERHOUSEHOLD: null,
                REGHANDLERLINK: null,
                REGRELATION: "",
                REGREMARK: null,
                REGBONETYPE2: null,
                REGSUBFUNERAL: null,  
                //里程数
                REGLCS: null,
                //车辆信息
                REGCLXX: [],
                //驾驶员
                REGJSY: null,
                //冰柜号
                ICENO: null,
                ICEID: null,
                //悼念厅
                MEMNAME: null,
                //灵堂号
                LINNAME: null,
                LINID: null,
                //骨灰堂
                ASSID: null,
                //参保月数
                REGSOCIALYEAR: null,
                //是否冻结
                REGFROZEN: null,
                // 骨灰盒
                REGCREURN: null,
                //是否冷藏
                PRPISCODE: null,
                //炉型
                REGCRETYPE: null,
                // 未结账火化
                REGISONCHECKCREMA: null,
                REGISONCHECKCREMADESC: null,
                // 是否冷藏
                REGISCODE: null,
                REGISCODEDESC: null,
                //财政归属 （宁波）个性化
                REGFINANCESBELONG:null,
                REGCRESERIALNUMBER:null,  //宁波个性化炉号
                isRegisDefaultCreSameday: null, //打开弹框是否默认火化日期 true 不默认 false 默认
            },
            // 是否显示骨灰盒
            IsShowRegcreurn: null,
            isDefaulthjdz: null,
            isDefaultjmlx: null, // 临海个性化
            IsMatchingJointData: null,
            isshowxl: true,
            cdhdata: {
                List_Carry:[],
                CARCODNAME: null,
                CDHCARID: null,
                CARLIC: null,
                CDHDRIVER: null,
                STANAME: null,
                CDHMILEAGE: null,
                //出车日期
                CDHACTUALDATE: null,
                //出车时间
                CDHACTUALTIME: null
            },
            cdhdataEexend: {
                cardata: [],
                cardata2: [],
                cardata3: []
            },
            regDataEexend: {
                regDeathDate: null,
                regDataTime: null,
                RegBirthDate: null,
                //火花日期
                regCremationDate: null
            },
            cdhActualDateTime: null,
            chls: {
                OFFCODNAME: null,
                OFFDESC: null
            },
            carryAreaInfo: null,
            isShowPdf: false,
            pdfPrintID: null,
            //火化日期
            regCremationDate: null,
            cardInfo: [],
            hidden: "",
            isUse: null,
            nameischongfus: null,
            REGLBPRPID:'',

            // 是否打印联办单
            IsPrintJointOrder: null,
            IsRegistrationGoToCheck: null, // 为20跳划价
            REGRELATIONOptions: [],
            icestatus: [
                {
                    label: "A",
                    value: "否"
                },
                {
                    label: "B",
                    value: "是"
                }
            ],
            PoliteCdh: {
                CDHCARID: null,
                CDHMILEAGE: null,
                CARLIC: null
            },
            REGLBPRPID:'',
            isshowghqx: true,
            syYdhh: false,
        };
        
    },
    methods: {
        clear(val) {
            if (this.IsShowKeptSign) {
                if (val == "A") {
                    this.regData.ICEID = null;
                }
            }
        },
        clearnb(val) {
            if (this.IslenNB) {
                if (val == "A") {
                    this.regData.ICEID = null;
                }
            }
        },
        //获取编码
        getCode() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.QueryAllCode,
                res => {
                    this.codeList = res.data.content;
                    for (var i in this.codeList) {
                        switch (this.codeList[i].CTPID) {
                            case "逝者类型":
                                this.szlx = this.codeList[i].Cods;
                                this.szlx.map((item)=>{
                                if(item.CODNAME=="异地火化"){
                                item.disabled=true
                                }
                                })
                                this.regData.REGBONETYPE = this.szlx[0].CODNAME;
                                if(this.order=="异地火化"){
                                     this.regData.REGBONETYPE = this.szlx[3].CODNAME;
                                     this.noshow=true
                                }else{this.noshow=false}
                                break;
                            case "遗体去向":
                                this.ytqx = this.codeList[i].Cods;
                                this.regData.REGYITIQX = this.ytqx[0].CODNAME;
                                break;
                            case "骨灰去向":
                                this.ghqx = this.codeList[i].Cods;
                                if (this.WhereaboutsOfAsh) {
                                    this.regData.REGGHQX = null;
                                } else {
                                    this.regData.REGGHQX = this.ghqx[0].CODNAME;
                                }
                                break;
                            case "性别类型":
                                this.xblx = this.codeList[i].Cods;
                                break;
                            case "身份证件类型":
                                this.sfzjlx = this.codeList[i].Cods;
                                this.regData.REGCARDTYPE = this.sfzjlx[0].CODNAME;
                                this.regData.REGHANDLERCARDTYPE = this.sfzjlx[0].CODNAME;
                                break;
                            case "国籍类别":
                                this.gjlb = this.codeList[i].Cods;
                                break;
                            case "民族":
                                this.mz = this.codeList[i].Cods;
                                this.regData.REGNATION = this.mz[0].CODNAME;
                                break;
                            case "文化程度类型":
                                this.whcdlx = this.codeList[i].Cods;
                                break;
                            case "婚姻状况类型":
                                this.hyzklx = this.codeList[i].Cods;
                                break;
                            case "职业类型":
                                this.zylx = this.codeList[i].Cods;
                                break;
                            case "政治面貌类型":
                                this.zzmmlx = this.codeList[i].Cods;
                                break;
                            case "户籍类别类型":
                                this.hjlblx = this.codeList[i].Cods;
                                if (this.isDefaulthjdz == false) {
                                    this.regData.REGHOUSEHOLDTYPE = this.hjlblx[1].CODNAME;
                                }
                                break;
                            case "户籍所在地类型":
                                this.hjszdlx = this.codeList[i].Cods;
                                break;
                            case "减免类型":
                                this.jmlx = this.codeList[i].Cods;
                                if (this.isDefaultjmlx == true) {
                                    this.regData.REGISKEYPOINT = this.jmlx[2].CODNAME;
                                }else{
                                    this.regData.REGISKEYPOINT = this.jmlx[0].CODNAME;
                                }
                                break;
                            default:
                        }
                    }
                }
            );
        },
        // 获取逝者关系
        getSzgxType() {
            apiBase.DoService(
                {},
                apiBase.getApiAdress().Code.GetSzgxType,
                res => {
                    let SzgxType = res.data.content;
                    this.REGRELATIONOptions = SzgxType.map(item => ({
                        label: item.CodeName,
                        value: item.CodeValue
                    }));
                }
            );
        },

        // 判断接尸地址是否使用二级级联 true/false--------------
        getNew() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Param.GetIsCorpseUseCascade,
                res => {
                    this.isAdd = res.data.content;
                    if (this.isAdd == false) {
                        //获取常用地址
                        this.isaddress = true;
                        let data = {};
                        apiBase.DoService(
                            data,
                            apiBase.getApiAdress().Code.GetCommonAddress,
                            res => {
                                this.commonAddr = res.data.content;
                            }
                        );
                    } else {
                        this.isaddress = false;
                        this.getcityType();
                    }
                }
            );
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Param.GetIsDisplayHouseholdType,
                res => {
                    this.isshow = res.data.content;
                }
            );
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Param.GetIsDisplayReductionCardNo,
                res => {
                    this.issee = res.data.content;
                }
            );
        },
        //获取预约地址 (多级)
        //获取预约地址
        getcityType() {
            // 获取级联选择
            apiBase.DoService(
                {},
                apiBase.getApiAdress().Reserve.GetBorough,
                res => {
                    let datas = res.data.content;
                    this.addressOptions = datas.map(item => ({
                        label: item.AFCADDRESS,
                        value: item.AFCID,
                        children: this.restructur(item.ListFulafc)
                    }));
                }
            );
        },
        restructur(value) {
            let arr = JSON.parse(JSON.stringify(value));
            var data = [];
            arr.forEach(item => {
                if (item.ListFulafc.length > 0) {
                    data.push({
                        label: item.AFCADDRESS,
                        value: item.AFCID,
                        children: this.restructur(item.ListFulafc)
                    });
                } else {
                    data.push({
                        label: item.AFCADDRESS,
                        value: item.AFCID
                    });
                }
            });
            return data;
        },
        //地址模板(详细地址)
        selectAddr(value) {
            if (this.isAdd == false) {
                if (this.regData.REGCYADDRESS != null) {
                    this.regData.REGADDRESS = this.regData.REGCYADDRESS + "";
                }
            } else {
                this.$nextTick(() => {
                    let text = this.$refs.address.currentLabels + "";
                    let arr = text.split(",");
                    text = arr.join("");
                    this.$set(this.regData, "REGADDRESS", text);
                }) 
            }
        },

        //------------------------

        //搜索信息
        searchmessages() {
            this.$confirm("是否确认逝者信息和条码信息?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            })
                .then(callback => {
                    let data = {
                        REGCARDNO: this.REGCARDNOS,
                        BARID: this.olddatas
                    };
                    apiBase.DoService(
                        data,
                        apiBase.getApiAdress().Registration.DataPushHFByCardBar,
                        res => {
                            this.$refs.searchmessage.close();
                            if (res.data.content.PRPID == null) {
                                this.open("信息匹配登记自送");
                            } else {
                                this.open(
                                    "信息匹配修改",
                                    res.data.content.PRPID
                                );
                            }
                        }
                    );
                })
                .catch(error => {
                    this.$message({
                        type: "info",
                        message: "已取消"
                    });
                });
        },
        //搜索信息-联办
        searchmessagesLB() {
            this.initSelectData(); //初始化下拉框
            this.$confirm("是否确认逝者信息和条码信息?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            })
                .then(callback => {
                    if(this.NEIREGID){
                        this.$refs.lianbansearchmessage.close();
                        this.open("在馆内联办匹配修改",this.NEIREGID,this.REGLBPRPID);
                    }else{
                       let data = {
                            REGPRPID: this.REGPRPID,
                            REGLBPRPID: this.REGLBPRPID
                        };   
                        apiBase.DoService(
                        data,
                        apiBase.getApiAdress().Registration.DataPushHFByPrpNos,
                        res => {
                            this.REGPRPID = null;
                            this.REGLBPRPID = '';
                            this.$refs.lianbansearchmessage.close();
                            this.open("联办信息匹配修改");
                            let resdata = res.data.content;
                            this.regData.REGDAYNUM = resdata.PRPDAYNUM;
                            this.regData.REGHANDLERNAME = resdata.PRPLINKMAN;
                            this.regData.REGNAME = resdata.PRPDEADNAME;
                            this.regData.REGPRPID = resdata.PRPID;
                            this.regData.REGADDRESS = resdata.PRPCORPSEADDRESS;
                            this.regData.REGHANDLERLINK = resdata.PRPLINKPHONE;
                            this.regData.REGYITIQX = resdata.PRPYITIQX;
                            this.regData.REGREMARK = resdata.PRPDESCRIBE;
                            this.regData.REGSEX = resdata.PRPDEADSEX;
                            this.regData.REGAGE = resdata.PRPDEADAGE;
                            this.regData.LINID = resdata.PRPLINID;

                            this.REGLBPRPID = resdata.REGLBPRPID;

                            this.regData.REGBONETYPE = this.szlx[0].CODNAME; //逝者类型
                            this.regData.REGHOUSEHOLDTYPE = this.hjlblx[1].CODNAME; //户籍类别
                               if (this.isDefaultjmlx == true) {
                                    this.regData.REGISKEYPOINT = this.jmlx[2].CODNAME;  //临海  快速匹配之后减免类型默认为重点
                                }else{
                                    this.regData.REGISKEYPOINT = this.jmlx[0].CODNAME;
                                }
                            this.regData.REGGHQX = this.ghqx[0].CODNAME; //骨灰去向
                            this.regDataEexend.regDataTime = new Date(); //默认到馆时间
                            this.regData.REGNATION = this.mz[0].CODNAME; //，默认民族

                            if (resdata.PRPISPOD === "A") {
                                this.regData.REGISPOD = "否";
                            } else if (resdata.PRPISPOD === "B") {
                                this.regData.REGISPOD = "是";
                            } else {
                                this.regData.REGISPOD = "";
                            }

                            this.regData.REGHANDLERCARDTYPE = resdata.PRPCARDNO;

                            this.regData.REGCRETYPE = resdata.PRPCREMATION;

                            if (resdata.PRPISCODE !== "") {
                                this.regData.PRPISCODE = resdata.PRPISCODE;
                            }
                            if (this.IsRegSendUse) {
                                if (resdata.Ich) {
                                    this.regData.ICENO = resdata.Ich.ICENO;
                                }
                            }

                            //参保月数
                            this.regData.REGSOCIALYEAR = resdata.PRPSOCIALYEAR;
                            //是否冻结
                            // this.regData.REGFROZEN = resdata.PRPFROZEN;
                            if (resdata.PRPFROZEN === "A") {
                                this.regData.REGFROZEN = "否";
                            } else if (resdata.PRPFROZEN === "B") {
                                this.regData.REGFROZEN = "是";
                            }
                            //减免类型
                            if (this.isshowSource) {
                                // this.regData.REGISKEYPOINT = resdata.PRPISKEYPOINT;
                            }
                            // this.regData.REGCARDTYPE = resdata.PRPCARNOTYPE;//逝者证件类型
                            if (resdata.PRPCARNOTYPE == "") {
                                this.regData.REGCARDTYPE = "内地居民身份证";
                            } else {
                                this.regData.REGCARDTYPE = resdata.PRPCARNOTYPE;
                            }
                            this.regData.REGCARDNO = resdata.PRPCARDNO; //逝者证件号码
                            this.regData.REGDETAILADDRESS =
                                resdata.PRPDETAILADDRESS; //逝者详细地址
                            this.regDataEexend.regDeathDate = dateStringToDate(
                                //死亡时间
                                resdata.PRPDEATHDATE
                            );
                            this.regDataEexend.RegBirthDate = dateStringToDate(
                                //出生时间
                                resdata.PRPBIRTHDAY
                            );
                            this.regDataEexend.regCremationDate = dateStringToDate(
                                //火化日期
                                resdata.PRPCREMATIONDATE
                            );
                            if(!this.isRegisDefaultCreSameday){  //默认执行
                                if (this.regDataEexend.regCremationDate == null || this.regDataEexend.regCremationDate == "") {
                                    this.regDataEexend.regCremationDate = new Date();
                                }
                            }
                            this.cauinfos = [
                                resdata.PRPCAUSA,
                                resdata.PRPCAUSASON
                            ]; //死亡原因;
                            // this.regData.REGHANDLERCARDTYPE = resdata.PRPLINKCARDNOTYPE;//联系人证件类型
                            if (resdata.PRPLINKCARDNOTYPE == "") {
                                this.regData.REGHANDLERCARDTYPE =
                                    "内地居民身份证";
                            } else {
                                this.regData.REGHANDLERCARDTYPE =
                                    resdata.PRPLINKCARDNOTYPE;
                            }
                            this.regData.REGHANDLERCARDNO =
                                resdata.PRPLINKCARDNO; //联系人证件号码
                            this.regData.REGHANDLERHOUSEHOLD =
                                resdata.PRPLINKADDRESS; //联系地址
                            this.regData.REGRELATION = resdata.PRPRELATION; //联系人与逝者关系
                            // this.regData.REGISUSEJOINT = resdata.REGISUSEJOINT; //是否联办

                            ORDER.LINID = resdata.PRPLINID;
                            if (resdata.LIHSTATUS === "A") {
                                this.regData.LINNAME = null;
                            } else {
                                this.regData.LINNAME = resdata.PPRLINNAME;
                            }
                            // PRPCORPSEADDRESS
                            this.regData.REGCYADDRESS = resdata.PRPADDID;
                            if (resdata.Cdh) {
                                this.cdhdataEexend.cardata = [
                                    resdata.Cdh.CARCODNAME,
                                    resdata.Cdh.CDHCARID
                                ];
                                this.cdhdata.CDHDRIVER = resdata.Cdh.CDHDRIVER;
                                this.cdhdata.CDHMILEAGE =
                                    resdata.Cdh.CDHMILEAGE;
                            }
                            this.gethallnumber(); //获取灵堂号
                            this.getMemorialhall(); //获取悼念厅
                            this.getCremahall(); //获取炉子编号下拉
                            this.getnoIce(); //获取未使用冰柜信息
                            // setTimeout(() => {
                            //   this.open('联办信息匹配修改',res.data.content.PRPID);
                            // }, 100);
                            //多级地址选择详情
                            if(this.regData.REGCYADDRESS){   //联办推过来没有这个字段 所以不掉用这个接口
                            if (this.isAdd == true) {
                                apiBase.DoService(
                                    { AFCID: this.regData.REGCYADDRESS },
                                    apiBase.getApiAdress().Reserve.GetBoroughByID,
                                    res => {
                                        this.arr = res.data.content; //地址选择详情
                                    }
                                );
                            }
                            }
                          
                        }
                    );
                    }
                })
                .catch(() => {
                    this.$message({
                        type: "info",
                        message: "已取消"
                    });
                });
        },
        //快速登记提交
        quickregistrations() {
            let data = {
                REGBARNO: this.REGBARNO
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.DataPushHFByCardBar,
                res => {
                    this.$refs.quickregistration.close();
                    if (res.data.content.PRPID == null) {
                        this.$message({
                            type: "error",
                            message: "请检查条形码！"
                        });
                    } else {
                        this.open("义乌火化登记", res.data.content.PRPID);
                    }
                }
            );
        },

        //地址类型改变，户籍地址改变（地址类型为其他时，户籍地址为空）
        adresstypechange(val) {
            if (val === "其他") {
                this.ctyLists = [];
            } else if (val === "国内") {
                this.ctyLists = [
                    this.ctydata.StaCode,
                    this.ctydata.CtyCode,
                    this.ctydata.CntCode
                ];
            }
        },
        //发送二维码
        giveolddatas(val) {
            let data = {
                REGID: this.COPYREGID,
                BARID: val
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.DataPushHF,
                res => {
                    this.$message({
                        type: "success",
                        message: "成功!"
                    });
                }
            );
        },
        //出生日期改变触发
        birthdaydata(val) {
            this.regData.REGBIRTHDATE = formatDate(val, "yyyyMMdd");
            let now = new Date();
            var nY = now.getFullYear();
            var nM = now.getMonth() + 1;
            var nD = now.getDate();
            if (val) {
                var dY = val.getFullYear();
                var dM = val.getMonth() + 1;
                var dD = val.getDate();
                var adjust;
                if (nM * 31 + nD >= dM * 31 + dD) {
                    adjust = 0;
                } else adjust = -1;
                this.regData.REGAGE =
                    now.getFullYear() - val.getFullYear() + adjust;
            }
        },
        //证件号码改变触发
        identityNumber(val) {
            if (!codeValid(val)) {
                return;
            }
            this.regDataEexend.RegBirthDate = null;
            if (val === null || val === undefined) return;
            var strDate;
            if (this.regData.REGCARDNO.length === 15)
                strDate = "19" + this.regData.REGCARDNO.substr(6, 6);
            else if (this.regData.REGCARDNO.length === 18)
                strDate = this.regData.REGCARDNO.substr(6, 8);
            else return;
            this.regDataEexend.RegBirthDate = dateStringToDate(strDate);
            this.birthdaydata(this.regDataEexend.RegBirthDate);
        },
        identityNumberBlur(val) {
            // 身份证号码正确并且在修改页面的时候执行这个方法
            // this.IsMatchingJointData：火化登记身份证输入是否匹配联办数据
            // !codeValid(val) ||
            if (this.IsMatchingJointData != true) {
                return;
            }
            let data = {
                REGID:this.regids,
                REGCARDNO: val
            };
            apiBase.DoService(
            data,
            apiBase.getApiAdress().Registration.DataPushHFByCardBar1,
            res => {
                this.$confirm("是否使用联办数据?", "提示", {
                    confirmButtonText: "确定",
                    cancelButtonText: "取消",
                    type: "warning"
                })
                .then(() => {
                    let resdata = res.data.content;
                    this.REGLBPRPID = resdata.REGLBPRPID;
                    this.regDataEexend.RegBirthDate = dateStringToDate(
                        //出生时间
                        resdata.PRPBIRTHDAY
                    );
                    this.regData.REGHANDLERCARDTYPE = resdata.PRPCARDNO;
                    if (resdata.PRPCARNOTYPE == "") {
                        this.regData.REGCARDTYPE = "内地居民身份证";
                    } else {
                        this.regData.REGCARDTYPE = resdata.PRPCARNOTYPE;
                    }
                    this.cauinfos = [resdata.PRPCAUSA, resdata.PRPCAUSASON]; //死亡原因;
                    this.regData.REGAGE = resdata.PRPDEADAGE;
                    this.regData.REGNAME = resdata.PRPDEADNAME;
                    this.regData.REGSEX = resdata.PRPDEADSEX;
                    this.regDataEexend.regDeathDate = dateStringToDate(
                        //死亡时间
                        resdata.PRPDEATHDATE
                    );
                    this.regData.REGDETAILADDRESS = resdata.PRPDETAILADDRESS; //逝者详细地址
                    if (resdata.PRPFROZEN === "A") {
                        this.regData.REGFROZEN = "否";
                    } else if (resdata.PRPFROZEN === "B") {
                        this.regData.REGFROZEN = "是";
                    }
                    this.regData.REGHANDLERHOUSEHOLD = resdata.PRPLINKADDRESS; //联系地址
                    this.regData.REGHANDLERCARDNO = resdata.PRPLINKCARDNO; //联系人证件号码
                    if (resdata.PRPLINKCARDNOTYPE == "") {
                        this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                    } else {
                        this.regData.REGHANDLERCARDTYPE = resdata.PRPLINKCARDNOTYPE;
                    }
                    this.regData.REGHANDLERNAME = resdata.PRPLINKMAN;
                    this.regData.REGHANDLERLINK = resdata.PRPLINKPHONE;
                    this.regData.REGRELATION = resdata.PRPRELATION; //联系人与逝者关系
                    // this.regData.REGISUSEJOINT = resdata.REGISUSEJOINT; //是否联办
                })
                .catch(() => {
                this.REGLBPRPID = res.data.content.REGLBPRPID;
                // this.submit(false);
                });
            },
                res=>{
                    Message.error(res.data.msg);
                    this.REGLBPRPID = ''
                })
            },
        // //获取常用地址
        // getCommonAddr() {
        //   let data = {};
        //   apiBase.DoService(
        //     data,
        //     apiBase.getApiAdress().Code.GetCommonAddress,
        //     res => {
        //       this.commonAddr = res.data.content;
        //     }
        //   );
        // },
        // selectAddr() {
        //   this.regData.REGADDRESS = this.regData.REGCYADDRESS;
        // },
        // selectAddrs() {
        //   let jsdatas = this.jsdata[1];
        //   let givejsdata;
        //   this.area.forEach(function(value, index, arr) {
        //         value.children.forEach(function(v, i, a) {
        //           if (v.value == jsdatas) {
        //            givejsdata = v.label;
        //           }
        //         });
        //       });
        //   this.regData.REGADDRESS = givejsdata;
        // },
        getAddr() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetAddressMap,
                res => {
                    let cardata = res.data.content;
                    this.area = cardata.map(item => ({
                        value: item.ADDID,
                        label: item.ADDNAME,
                        ADDLEVEL: item.ADDLEVEL,
                        ADDTOPID: item.ADDTOPID,
                        children: item.Children.map(itemStr => ({
                            value: itemStr.ADDID,
                            label: itemStr.ADDNAME,
                            ADDLEVEL: itemStr.ADDLEVEL,
                            ADDTOPID: itemStr.ADDTOPID
                        }))
                    }));
                    //宁波可能要的 如果没有children可选到第一级
                    this.area.forEach(item=>{
                         if(item.children.length==0){
                             delete item.children
                         }
                    })
                    //义乌个性化负默认值
                    if(this.showtongji){
                        if(this.area){
                            this.carryArea=[this.area[0].value,this.area[0].children[0].value]
                        }
                    }

                }
            );
        },
        //获取死亡原因
        getCausa() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetCausa,
                res => {
                    let caudata = res.data.content;
                    this.cause = caudata.map(item => ({
                        label: item.CAENAME,
                        value: item.CAEID,
                        children: item.Caus.map(itemCau => ({
                            label: itemCau.CAUNAME,
                            value: itemCau.CAUID
                        }))
                    }));
                    if (this.CauseOfDeath) {
                        this.cauinfos = [];
                    } else {
                        if (this.cause[0] && this.cause[0].children[0])
                            this.cauinfos = [
                                this.cause[0].value,
                                this.cause[0].children[0].value
                            ];
                    }
                }
            );
        },
        //获取服务类型
        getServiceTypes() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetYitiqx,
                res => {
                    this.serviceListType = res.data.content;
                }
            );
        },
        //获取司机
        getDrivers() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Staff.QueryDriver,
                res => {
                    let driverData = res.data.content,
                        legendsDrivers = driverData.map(item => ({
                            label: item.STANAME,
                            value: item.STAID
                        }));
                    this.drivers = legendsDrivers;
                }
            );
        },
        //获取户籍所在地
        getHousehold() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetHousehold,
                res => {
                    let cardata = res.data.content;
                    this.household = cardata.map(item => ({
                        label: item.StaName,
                        value: item.StaCode,
                        children: item.List_Cty.map(itemCty => ({
                            label: itemCty.CtyName,
                            value: itemCty.CtyCode,
                            children: itemCty.List_Cnt.map(itemCnt => ({
                                label: itemCnt.CntName,
                                value: itemCnt.CntCode
                            }))
                        }))
                    }));
                }
            );
        },
        //根据编码获取所在地
        getHouseholdInfo(code) {
            let data = {
                CODE: code
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.GetHousehold,
                res => {
                    this.ctydata = res.data.content;
                    this.ctyLists = [
                        this.ctydata.StaCode,
                        this.ctydata.CtyCode,
                        this.ctydata.CntCode
                    ];
                    if (this.ctydata)
                        this.ctyInfo =
                            this.ctydata.StaName +
                            "/" +
                            this.ctydata.CtyName +
                            "/" +
                            this.ctydata.CntName;
                }
            );
        },
        //获取预约信息
        getReserveInfo(id) {
            let data = {
                PRPID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Reserve.DetailPhoneReserve,
                res => {
                    let resdata = res.data.content;
                    this.regData.REGDAYNUM = resdata.PRPDAYNUM;
                    this.regData.REGHANDLERNAME = resdata.PRPLINKMAN;
                    this.regData.REGNAME = resdata.PRPDEADNAME;
                    this.regData.REGPRPID = resdata.PRPID;
                    this.regData.REGADDRESS = resdata.PRPCORPSEADDRESS;
                    this.regData.REGHANDLERLINK = resdata.PRPLINKPHONE;
                    this.regData.REGYITIQX = resdata.PRPYITIQX;
                    this.regData.REGREMARK = resdata.PRPDESCRIBE;
                    this.regData.REGSEX = resdata.PRPDEADSEX;
                    this.regData.REGAGE = resdata.PRPDEADAGE;
                    this.regData.LINID = resdata.PRPLINID;
                    if (resdata.PRPISPOD === "A") {
                        this.regData.REGISPOD = "否";
                    } else if (resdata.PRPISPOD === "B") {
                        this.regData.REGISPOD = "是";
                    } else {
                        this.regData.REGISPOD = "";
                    }

                    this.regData.REGHANDLERCARDTYPE = resdata.PRPCARDNO;

                    this.regData.REGCRETYPE = resdata.PRPCREMATION;
                    if (resdata.PRPISDEPOSIT !== "") {
                        this.regData.REGGHQX = resdata.PRPISDEPOSIT;
                        this.isShowght(this.regData.REGGHQX); //如果骨灰去向是寄存的话，显示骨灰堂字段
                    }
                    if (resdata.PRPISCODE !== "") {
                        this.regData.PRPISCODE = resdata.PRPISCODE;
                    }
                    if (this.IsRegSendUse) {
                        if (resdata.Ich) {
                            this.regData.ICENO = resdata.Ich.ICENO;
                        }
                    }

                    //获取到馆时间
                    if (res.data.content.REGTIMEDESC != "") {
                        this.regDataEexend.regDataTime = timeStringToDate(
                            //火化登记中到馆时间
                            res.data.content.REGTIMEDESC,
                            res.data.content.REGDATEDESC
                        );
                    }

                    //参保月数
                    this.regData.REGSOCIALYEAR = resdata.PRPSOCIALYEAR;
                    //是否冻结
                    // this.regData.REGFROZEN = resdata.PRPFROZEN;
                    if (resdata.PRPFROZEN === "A") {
                        this.regData.REGFROZEN = "否";
                    } else if (resdata.PRPFROZEN === "B") {
                        this.regData.REGFROZEN = "是";
                    }
                    //减免类型
                    if (this.isshowSource) {
                        // this.regData.REGISKEYPOINT = resdata.PRPISKEYPOINT;
                    }
                    // this.regData.REGCARDTYPE = resdata.PRPCARNOTYPE;//逝者证件类型
                    if (resdata.PRPCARNOTYPE == "") {
                        this.regData.REGCARDTYPE = "内地居民身份证";
                    } else {
                        this.regData.REGCARDTYPE = resdata.PRPCARNOTYPE;
                    }
                    this.regData.REGCARDNO = resdata.PRPCARDNO; //逝者证件号码
                    this.regData.REGDETAILADDRESS = resdata.PRPDETAILADDRESS; //逝者详细地址
                    this.regDataEexend.regDeathDate = dateStringToDate(
                        //死亡时间
                        resdata.PRPDEATHDATE
                    );
                    this.regDataEexend.RegBirthDate = dateStringToDate(
                        //出生时间
                        resdata.PRPBIRTHDAY
                    );
                    this.regDataEexend.regCremationDate = dateStringToDate(
                        //火化日期
                        resdata.PRPCREMATIONDATE
                    );
                    if(!this.isRegisDefaultCreSameday){  //默认执行
                        if (String(this.regDataEexend.regCremationDate) == 'null' || this.regDataEexend.regCremationDate == "") {
                            if(this.order != '遗体外运1'){
                                this.regDataEexend.regCremationDate = new Date();
                            }else{
                                this.regDataEexend.regCremationDate = null;
                            }
                        }
                    }
                    this.cauinfos = [resdata.PRPCAUSA, resdata.PRPCAUSASON]; //死亡原因;
                    // this.regData.REGHANDLERCARDTYPE = resdata.PRPLINKCARDNOTYPE;//联系人证件类型
                    if (resdata.PRPLINKCARDNOTYPE == "") {
                        this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                    } else {
                        this.regData.REGHANDLERCARDTYPE =
                            resdata.PRPLINKCARDNOTYPE;
                    }
                    this.regData.REGHANDLERCARDNO = resdata.PRPLINKCARDNO; //联系人证件号码
                    this.regData.REGHANDLERHOUSEHOLD = resdata.PRPLINKADDRESS; //联系地址
                    this.regData.REGRELATION = resdata.PRPRELATION; //联系人与逝者关系
                    // this.regData.REGISUSEJOINT = resdata.REGISUSEJOINT; //是否联办

                    ORDER.LINID = resdata.PRPLINID;
                    if (resdata.LIHSTATUS === "A") {
                        this.regData.LINNAME = null;
                    } else {
                        this.regData.LINNAME = resdata.PPRLINNAME;
                    }
                    // PRPCORPSEADDRESS
                    this.regData.REGCYADDRESS = resdata.PRPADDID;
                    if (resdata.Cdh) {
                        this.cdhdataEexend.cardata = [
                            resdata.Cdh.CARCODNAME,
                            resdata.Cdh.CDHCARID
                        ];
                        this.cdhdata.CDHDRIVER = resdata.Cdh.CDHDRIVER;
                        this.cdhdata.CDHMILEAGE = resdata.Cdh.CDHMILEAGE;
                        this.cdhdata.CDHACTUALDATE = dateStringToDate(resdata.Cdh.CDHACTUALDATE);
                        this.cdhdata.CDHACTUALTIME = timeStringToDate(resdata.Cdh.CDHACTUALTIME);    
                        if(this.Isshowjyy==true){
                        this.carriersinfo = resdata.Cdh.CarryName  //接运员详情  宁波个性化需求  获取预约信息
                        if(res.data.content.Cdh.list_CarryArr){
                        this.collectMember= resdata.Cdh.list_CarryArr
                        }
                        }
                    }
                    this.gethallnumber();
                    this.getMemorialhall();
                    this.getCremahall(); //获取炉子编号下拉
                    this.getnoIce();
                    //多级地址选择详情
                    if (this.isAdd == true && this.regData.REGCYADDRESS) {
                        apiBase.DoService(
                            { AFCID: this.regData.REGCYADDRESS },
                            apiBase.getApiAdress().Reserve.GetBoroughByID,
                            res => {
                                this.arr = res.data.content; //地址选择详情
                            }
                        );
                    }

                }
            );
        },
        carchange(val) {
            this.carLics.forEach(item => {
                if (val[0] == item.value) {
                    item.children.forEach(list => {
                        if (val[1] == list.value) {
                            this.cdhdata.CDHDRIVER = list.CARDRIVER;
                        }
                    });
                }
            });
        },
        //获取预约火化炉类型
        GetCreationStatus() {
            let data = {};
            apiBase.DoService(
                data,
                // apiBase.getApiAdress().Reserve.GetPrpCreationStatus,
                apiBase.getApiAdress().Code.GetCremationType,
                res => {
                    let creTypeData = res.data.content,
                        legendsCreData = creTypeData.map(item => ({
                            Text: item.CodeName,
                            Value: item.CodeValue
                        }));
                    this.hhldata = legendsCreData;
                    this.hhldata.unshift({ Text: "不选择", Value: "" });
                }
            );
        },
        //获取车辆信息
        getCar() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Car.QueryCarByType,
                res => {
                    let cardata = res.data.content;
                    let legendsCarData = cardata.map(item => ({
                        label: item.CodeName,
                        value: item.CodeValue,
                        children: item.list_Cars.map(caritem => ({
                            label: caritem.CARLIC,
                            value: caritem.CARID,
                            CARDRIVER: caritem.CARDRIVER
                        }))
                    }));
                    this.carLics = legendsCarData;
                }
            );
        },
        //获取冰柜信息
        getIce() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Ice.QueryIceByIceArea,
                res => {
                    let icedata = res.data.content;
                    let IceData = icedata.map(item => ({
                        label: item.ICANAME,
                        value: item.ICAID,
                        children: item.list_Ices.map(iceitem => ({
                            label: iceitem.ICENO,
                            value: iceitem.ICEID
                        }))
                    }));
                    this.icelist = IceData;
                }
            );
        },
        //获取未使用冰柜信息
        getnoIce() {
            let data = {
                ICEID: ORDER.ICEID
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().IceUse.QueryIceBynotuse,
                res => {
                    this.icenum = res.data.content;
                }
            );
        },
        // 获取骨灰堂数据
        async getColumbarium() {
          return new Promise((resolve,reject)=>{
            let data = {};
                apiBase.DoService(
                    data,
                    apiBase.getApiAdress().AshesUse.QueryAsaAshes,
                    res => {
                        let barium = res.data.content;
                        this.columbarium = barium.map(item => ({
                            label: item.ASANAME,
                            value: item.ASAID,
                            children: item.Ass.map(itemCau => ({
                                label: itemCau.ASSNAME,
                                value: itemCau.ASSID
                            }))
                        }));
                      resolve()  
                    }
                );
            })

        },
        isShowght(val) {
            if (val === "B") {
                this.isshowght = true;
            } else {
                this.isshowght = false;
            }
        },
        //获取火化炉类型
        getCreTypes() {
            apiBase.DoService(
                {},
                apiBase.getApiAdress().Code.GetCremationType,
                res => {
                    let creTypeData = res.data.content,
                        legendsCreData = creTypeData.map(item => ({
                            label: item.CodeName,
                            value: item.CodeValue
                        }));
                    this.creTypes = legendsCreData;
                }
            );
            //获取财政归属下拉
                  apiBase.DoService({}, apiBase.getApiAdress().Registration.GetCntName,
                res => {
                    let czgsTypeData = res.data.content,
                        czgsData = czgsTypeData.map(item => ({
                            label: item.DTRSTACNTNAME,
                            value: item.DTRCODE
                        }));
                    this.czgs = czgsData;
                }
            );
        },
        // 获取灵堂号
        gethallnumber() {
            let data = {
                LINID: this.showselect == 1 ? ORDER.REFLINID : ORDER.LINID
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().MourningUse.QueryMourning,
                res => {
                    let driverData = res.data.content,
                        legendsDrivers = driverData.map(item => ({
                            label: item.LINNAME,
                            value: item.LINID
                        }));
                    this.hallnumber = legendsDrivers;
                }
            );
        },
        // 获取悼念厅
        getMemorialhall() {
            let data = {
                MEMID: ORDER.REFMEMID
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().MemorialUse.QueryMemorial,
                res => {
                    let driverData = res.data.content,
                        legendsDrivers = driverData.map(item => ({
                            label: item.MEMNAME,
                            value: item.MEMID
                        }));
                    this.Memorialhall = legendsDrivers;
                }
            );
        },
        // 获取火化炉
        getCremahall() {
            apiBase.DoService(
                {},
                apiBase.getApiAdress().CremationUse.QueryCremation,
                res => {
                  let creTypeData = res.data.content,
                            legendsCreData = creTypeData.map(item => ({
                                label: item.CRENO,
                                value: item.CREID
                            }));
                    this.creNames = legendsCreData;
                }
            );
        },

        getDESC() {
            this.MEMNAMEDESC = this.$refs.REFMEMID.currentLabels;
        },
        //获取内勤信息
        getpeopledata() {
            let data = {
                REGID: this.regids
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Internalduty.Detail,
                res => {
                    if (res.data.content.list_Off) {
                        this.chlLists = res.data.content.list_Off;
                    }
                    if (this.chlLists.length === 0) {
                        this.isshowtable = true;
                    } else {
                        this.isshowtable = false;
                    }
                }
            );
        },
        //逝者类型改变/保存逝者类型
        getdeadtype(type){
            if(type == '异地火化'){
                this.syYdhh = true;
                this.regDataEexend.regCremationDate = null;
            }else{
                this.syYdhh = false;
                this.regDataEexend.regCremationDate = new Date();
            }
        },
        //初始化下拉框数据
        async initSelectData() {
            //初始化下拉框数据
            this.getCode();
            this.getCausa();
            this.getHousehold();
            this.getCar();
            this.getCreTypes();
            this.getServiceTypes();
            this.getDrivers();
            this.getAddr();
            this.GetCreationStatus();
            await this.getColumbarium();
        },
        //打开页面
        async open(order, id, ids, current) {
            this.regids = id;
            this.ischeck = false;
            if (current) {
                if (current.REGISCHECK === "B") {
                    this.ischeck = true;
                } else {
                    this.ischeck = false;
                }
            }
            this.syYdhh = false;
            this.order = order;
            this.isshowghqx = ids;
            //240改成了360
            this.maxHeight = window.innerHeight - 360;
            //清理数据
            this.dataRepeat();
            this.NameisChongfu();
            this.getSzgxType(); //获取逝者关系
            this.warntextshow = false;
            this.cdhActualDateTime = new Date();
            switch (this.order) {
                case ORDER.SELFREGISTER: //自送登记
                    this.regDataEexend.regCremationDate = null;
                    this.regDataEexend.regDataTime = new Date();
                    this.isshowtable = true;
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    var titlename;
                    for (
                        var i = 0;
                        i < this.$store.state.btnListCommon.length;
                        i++
                    ) {
                        if (
                            this.$store.state.btnListCommon[i].BTNVALUE ==
                            "自送登记"
                        ) {
                            titlename = this.$store.state.btnListCommon[i]
                                .BTNSHOWNAME;
                        }
                    }
                    for (
                        var i = 0;
                        i < this.$store.state.btnListCommon.length;
                        i++
                    ) {
                        if (
                            this.$store.state.btnListCommon[i].BTNVALUE ==
                                "自送登记" &&
                            this.$store.state.btnListCommon[i].BTNSHOWNAME == ""
                        ) {
                            titlename = this.$store.state.btnListCommon[i]
                                .BTNVALUE;
                        }
                    }
                    this.title = titlename;
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    this.getnoIce();
                    this.$refs.dialog.open();
                    break;
                case "异地火化": //上虞
                    this.syYdhh = true;
                    this.regDataEexend.regCremationDate = null;
                    this.regDataEexend.regDataTime = new Date();
                    this.isshowtable = true;
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    var titlename;
                    for (
                        var i = 0;
                        i < this.$store.state.btnListCommon.length;
                        i++
                    ) {
                        if (
                            this.$store.state.btnListCommon[i].BTNVALUE ==
                            "自送登记"
                        ) {
                            titlename = this.$store.state.btnListCommon[i]
                                .BTNSHOWNAME;
                        }
                    }
                    for (
                        var i = 0;
                        i < this.$store.state.btnListCommon.length;
                        i++
                    ) {
                        if (
                            this.$store.state.btnListCommon[i].BTNVALUE ==
                                "自送登记" &&
                            this.$store.state.btnListCommon[i].BTNSHOWNAME == ""
                        ) {
                            titlename = this.$store.state.btnListCommon[i]
                                .BTNVALUE;
                        }
                    }
                    this.title = titlename;
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    this.getnoIce();
                    this.$refs.dialog.open();
                    break;
                case "信息匹配登记自送": //信息匹配等级自送
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regCremationDate = new Date();
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    if (this.IsRegSendUse === true) {
                        // this.getpeopledata();
                    }
                    this.title = "火化登记";
                    this.$refs.dialog.open();
                    break;
                case ORDER.REGISTER: //火化登记
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regCremationDate = new Date();
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    this.title = "火化登记";
                    this.$refs.dialog.open();
                    this.getReserveInfo(id);
                    break;
                case "义乌火化登记": //火化登记
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regCremationDate = null;
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    this.getpeopledata();
                    this.title = "火化登记";
                    this.$refs.dialog.open();
                    this.getReserveInfo(id);
                    break;
                case "信息匹配登记":
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regCremationDate = new Date();
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = this.isGut;
                    this.initSelectData();
                    if (this.IsRegSendUse === true) {
                        this.getpeopledata();
                    }
                    this.title = "火化登记";
                    this.$refs.dialog.open();
                    this.getReserveInfo(id);
                    break;
                case ORDER.MODIFY: //修改
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (ids == "B" || ids == "C") {
                        this.isshowxl = true;
                    } else {
                        this.isshowxl = false;
                    }
                    this.isShowCharge = !ORDER.ICENUM;
                    await this.initSelectData();
                    this.isshowghts = !this.isGut;
                    this.$refs.dialog.open();
                    this.title = "登记修改";
                    this.dataInfo(id);
                    break;
                case "义乌修改": //修改
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (ids == "B" || ids == "C") {
                        this.isshowxl = true;
                    } else {
                        this.isshowxl = false;
                    }
                    this.isShowCharge = !ORDER.ICENUM;
                    await this.initSelectData();
                    this.getpeopledata();
                    this.isshowghts = this.isGut;
                    this.$refs.dialog.open();
                    this.title = "登记修改";
                    this.dataInfo(id); //详情
                    break;
                case "信息匹配修改": //修改
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                    if (ids == "B" || ids == "C") {
                        this.isshowxl = true;
                    } else {
                        this.isshowxl = false;
                    }
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode); //获取户籍地址
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM; //控制冰柜号
                    this.initSelectData(); //初始化下拉框
                    this.getReserveInfo(id); //详情
                    this.isshowghts = this.isGut; //控制骨灰堂
                    this.$refs.dialog.open();
                    this.title = "登记修改";
                    break;
                case "联办信息匹配修改": //修改
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                        this.isshowxl = true;
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode); //获取户籍地址
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM; //控制冰柜号
                    this.isshowghts = this.isGut; //控制骨灰堂
                    this.$refs.dialog.open();
                    this.title = "登记修改";
                    break;
                case "在馆内联办匹配修改": //修改
                    if (ORDER.Highmeter == 20) {
                        connects();
                    }
                        this.isshowxl = true;
                    if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode); //获取户籍地址
                    }
                    this.regData.REGHOUSETYPE = "国内";
                    this.regDataEexend.regDataTime = new Date();
                    this.isShowCharge = !ORDER.ICENUM; //控制冰柜号
                    this.isshowghts = this.isGut; //控制骨灰堂
                    this.$refs.dialog.open();
                    this.title = "在馆内联办登记修改";
                    this.dataInfo(id,'case',ids); //详情
                    break;
                case ORDER.INFO: //详情    ---------------新加详情页面-------------------------
                    //------------------------------------------
                    if (ids === "A") {
                        this.isShowCharge = !ORDER.ICENUM;
                        this.isshowghts = !this.isGut;
                        this.title = "登记详情";
                        await this.initSelectData();
                        if (this.IsRegSendUse === true) {
                            this.getpeopledata();
                        }
                        this.$refs.dialogdetail.open();
                        this.getReserveInfo(id);
                        break;
                    } else {
                        this.$refs.dialogInfo.open();
                        this.getAddr();
                        if (this.IsRegSendUse === true) {
                            this.getpeopledata();
                        }
                        this.title = "登记详情";
                        // 其他的详情
                        this.dataInfo(id);
                    }

                    break;
                case "数据匹配": //数据匹配
                    // 快速登记
                    // this.REGBARNO = null;
                    // this.$refs.quickregistration.open();

                    // 加背景色
                    let backcolor = "";
                    const inputs = document.querySelectorAll(
                        ".backcolors input.el-input__inner"
                    );
                    backcolor = "rgb(255,255,153)";
                    for (var i = 0; i < inputs.length; i++) {
                        inputs[i].style.backgroundColor = backcolor;
                    }

                    // 数据匹配
                    this.initSelectData();
                    this.olddatas = null;
                    this.shizhename = null;
                    this.REGNAMES = null;
                    this.REGCARDNOS = null;
                    this.REGDETAILADDRESSA = null;
                    this.$refs.searchmessage.open();
                    break;
                case "联办数据匹配": //联办数据匹配
                    // 联办数据匹配
                    this.initSelectData();
                    this.REGPRPID = null;
                    this.olddatas = null;
                    this.shizhename = null;
                    this.REGNAMES = null;
                    this.REGCARDNOS = null;
                    this.REGDETAILADDRESSA = null;
                    this.$refs.lianbansearchmessage.open();
                    break;
                case ORDER.GIVEOLDDATAS: //老数据推送
                    this.$refs.giveolddata.open();
                    this.title = "老数据推送";
                    this.COPYREGID = id;
                    this.olddata = null;
                    break;
                case ORDER.PROVES: //打印火化证明单
                    this.getPdf(id);
                    break;
                case ORDER.BUSINESS: //打印业务流转单
                    this.getPrint(id);
                    break;
                case ORDER.JOINT: //打印业务流转单
                    this.joint(id);
                    break;
                case ORDER.PTCRFS: //打印火化登记单
                    this.ptcrf(id);
                    break;
                case ORDER.PRINTSL: //打印火化清单
                    this.printsl(id);
                    break;
                case "打印遗体出冰通知单": //打印遗体出冰通知单 (宁波)
                    this.printout(id);
                    break;
                case "打印业务核对单": //打印遗体出冰通知单 (宁波)
                    this.printcheckyewu(id);
                    break;
                case "打印寄存核对单": //打印遗体出冰通知单 (宁波)
                    this.printcheckjicun(id);
                    break;
                case ORDER.BODYOUTAGE: //遗体外运
                    // this.isShowCharge = true;
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = !this.isGut;
                    this.$refs.dialog.open();
                    await this.initSelectData();
                    this.title = "登记修改";
                    this.dataInfo(id);
                    break;
                case ORDER.BODYOUTAGES: //遗体外运1
                    this.regDataEexend.regCremationDate = null;
                    this.regDataEexend.regDataTime = new Date();
                       if (this.$store.state.orginCode) {
                        this.getHouseholdInfo(this.$store.state.orginCode);
                    }
                    this.regData.REGHOUSETYPE = "国内";  //未到馆的数据，点遗体外运 数据默认值（上虞）
                    // this.isShowCharge = true;
                    this.isShowCharge = !ORDER.ICENUM;
                    this.isshowghts = !this.isGut;
                    this.title = "火化登记";
                    this.initSelectData();
                    if (this.IsRegSendUse === true) {
                        this.getpeopledata();
                    }
                    this.$refs.dialog.open();
                    this.getReserveInfo(id);
                    break;
                default:
            }
        },

        //信息匹配的时候获取逝者姓名
        getshizhename() {
            if (this.olddatas == null) return;
            let data = {
                BARID: this.olddatas
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.GetDataByBar_HF,
                res => {
                    this.shizhename = res.data.content.REGNAME;
                }
            );
        },
        //信息匹配的时候获取本地预约的逝者姓名
        getBendiDeadName() {
            if (this.olddatas == null) return;
            if(this.iskuaisu==true){
                let data = {
                    REGNO: this.olddatas
                };
                apiBase.DoService(
                    data,
                    apiBase.getApiAdress().Registration.GetRegOrPrpByNo,
                    res => {
                        this.shizhename = res.data.content.REGNAME;
                        this.REGPRPID = res.data.content.REGPRPID;
                        this.NEIREGID = res.data.content.REGID;
                    }
                );
            }
            else{
                let data = {
                    BARID: this.olddatas
                };
                apiBase.DoService(
                    data,
                    apiBase.getApiAdress().Registration.DataPushHFByPrpNo,
                    res => {
                        this.shizhename = res.data.content.REGNAME;
                        this.REGPRPID = res.data.content.REGPRPID;
                    }
                );
            }
        },
        getLianbanData() {
            if (this.REGCARDNOS == null) return;
            let data = {
                REGCARDNO: this.REGCARDNOS
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.DataPushHFByCardBar1,
                res => {
                    this.regData.REGSEX = res.data.content.PRPDEADSEX;
                    this.REGNAMES = res.data.content.PRPDEADNAME;
                    this.REGDETAILADDRESSA = res.data.content.PRPDETAILADDRESS;
                    this.REGLBPRPID = res.data.content.REGLBPRPID;
                    if (res.data.content.PRPFROZEN == "B") {
                        this.warntextshow = true;
                    } else {
                        this.warntextshow = false;
                    }
                }
            );
        },
        //提交
        submit(checkout = false) {
            switch (this.order) {
                case ORDER.SELFREGISTER: //自送登记
                case "异地火化": //自送登记
                case ORDER.REGISTER: //火化登记
                    this.dataAdd(checkout); //登记新增
                    break;
                case "义乌火化登记": //信息匹配
                    this.dataAddyw(checkout); //信息匹配
                    break;
                case "信息匹配登记": //信息匹配
                case "在馆内联办匹配修改": //信息匹配
                    this.dataAdds(checkout,this.order); //信息匹配
                    break;
                case "信息匹配登记自送": //信息匹配
                case "信息匹配修改":    // 测从联办过来的
                case "联办信息匹配修改":
                    this.dataAdds(checkout); //信息匹配
                    break;
                case ORDER.MODIFY: //修改
                    this.dataModify(checkout); //登记修改
                    break;
                case "义乌修改": //修改
                    this.dataModifyyw(checkout); //登记修改
                    break;
                case ORDER.BODYOUTAGE: //遗体外运
                    this.dataModifyOutage(checkout);
                    break;
                case ORDER.BODYOUTAGES: //遗体外运1
                    this.dataAddOutage(checkout);
                    break;
                case ORDER.DELETE:
                    break;
                case ORDER.INFO:
                    break;
                default:
            }
        },
        //取消按钮
        closedetail() {
            this.$refs.dialogdetail.close();
        },
        closeDialog() {
            if (
                this.order === ORDER.SELFREGISTER ||
                this.order ==="异地火化" ||
                this.order === ORDER.REGISTER ||
                this.order === ORDER.MODIFY ||
                this.order === ORDER.BODYOUTAGE ||
                this.order === ORDER.BODYOUTAGES ||
                this.order === "义乌火化登记" ||
                this.order === "义乌修改" ||
                this.order === "信息匹配修改" ||
                this.order === "联办信息匹配修改" ||
                this.order === "在馆内联办匹配修改"
            )
                this.$refs.dialog.close();
            else if (this.order === ORDER.INFO) this.$refs.dialogInfo.close();
            else if (
                this.order === "信息匹配登记" ||
                this.order === "信息匹配登记自送"
            )
                this.$refs.dialog.close();
        },
        //打印联办单
        joint(id) {
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintJointOffice,
                res => {
                    this.printUrllb = res.data.content.PDFNAME;
                    this.$refs.printlb.open();
                }
            );
        },
        //打印火化登记表
        ptcrf(id) {
            let data = {
                CHDID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintReg,
                res => {
                    this.printUrl = res.data.content.PDFNAME;
                    this.$refs.prints.open();
                }
            );
        },
        //打印火化清单
        printsl(id) {
            let data = {
                CHDID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintRegList,
                res => {
                    this.printUrl = res.data.content.PDFNAME;
                    this.$refs.prints.open();
                }
            );
        },
        //打印遗体出冰通知单 
        printout(id) {
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintRemainsIceout,
                res => {
                    this.printUrl = res.data.content.PDFNAME;
                    this.$refs.printsout.open();
                }
            );
        },
        //打印业务核对单
        printcheckyewu(id) {
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintBusinessContactCheckList,
                res => {
                    this.printUrlyewu = res.data.content.PDFNAME;
                    this.$refs.printscheckyewu.open();
                }
            );
        },
        //打印寄存核对单
        printcheckjicun(id) {
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintPlaceContactCheckList,
                res => {
                    this.printUrl = res.data.content.PDFNAME;
                    this.$refs.printscheckjicun.open();
                }
            );
        },
        //打印火化证明单
        getPdf(id) {
            this.pdfUrl = null;
            this.pdfPrintID = id;
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.DetailCremationRegistration,
                res => {
                    let REGCREMATIONDATES = dateStringToDate(
                        //火化日期
                        res.data.content.REGCREMATIONDATE
                    );
                    if (REGCREMATIONDATES == null) {
                        REGCREMATIONDATES = new Date();
                    }
                    let datas = {
                        REGID: id,
                        REGCREMATIONDATE: formatDate(
                            REGCREMATIONDATES,
                            "yyyyMMdd"
                        ) //火化日期
                    };
                    apiBase.DoService(
                        datas,
                        apiBase.getApiAdress().Pdf.UpdatePrintCre,
                        res => {
                            this.pdfUrl = res.data.content.PDFNAME;
                            this.$refs.dialog1.open();
                        },
                        res => {
                            this.$message.error(res.data.msg);
                            this.loading = false;
                        }
                    );
                }
            );
        },
        getPrint(id) {
            let data = {
                REGID: id
            };
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Pdf.PrintRegistration,
                res => {
                    this.printUrl = res.data.content.PDFNAME;
                    this.$refs.dialog2.open();
                }
            );
        },
        //登记新增 （自送登记）
        dataAdd(checkout = false) {
            //临海 通用改成二级下拉，判断没值传null给后台，
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
           
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.showselect == "1") {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCRELEVEL: this.regData.REFCRELEVEL,
                    REFCARID: this.cdhdataEexend.cardata2[1]
                };
            }
            if (this.IsxialaNB == true) {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCREID: this.regData.REFCREID,
                };
            }
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            if (!data.REGISKEYPOINT) {
                this.$message({
                    type: "error",
                    message: "请输入减免类型！"
                });
                return;
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER,
                    List_Carry:this.cdhdata.List_Carry,  //接运员传值给后台
                };
               if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }


            }
            if (this.cdhdataEexend.cardata3[1]) {
                data.PoliteCdh = {
                    CDHCARID: this.cdhdataEexend.cardata3[1],
                    CDHMILEAGE: this.PoliteCdh.CDHMILEAGE
                };
            }

            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null && this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }

            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }

                if (
                    data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                    data.REGHANDLERCARDNO.length > 0
                ) {
                    if (!codeValid(data.REGHANDLERCARDNO)) {
                        this.$message({
                            type: "error",
                            message: "家属身份证号码有误！"
                        });
                        return;
                    }
                }
            }
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            }
            if (this.IsMatchingJointData) {
                data.REGLBPRPID = this.REGLBPRPID; // 要加个判断
            }
            this.$store.state.isloading = true;
            //火化登记新增
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.CremationRegistration,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //取消
                    this.openDialog();
                    this.refreshData();
                    if (this.isUse === 1) {
                        this.RegisterCreate(res.data.content.REGID);
                    }
                    this.$message({
                        type: "success",
                        message: "登记成功!"
                    });
                    if (this.IsPrintJointOrder) {
                        this.joint(res.data.content.REGID);
                    }
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //登记新增(义乌)
        dataAddyw(checkout = false) {
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            // 减免类型必填
            if (!data.REGISKEYPOINT) {
                this.$message({
                    type: "error",
                    message: "请输入减免类型！"
                });
                return;
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER,
                    List_Carry:this.cdhdata.List_Carry,  //接运员传值给后台
                };
            }
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null && this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }

            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }

                if (
                    data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                    data.REGHANDLERCARDNO.length > 0
                ) {
                    if (!codeValid(data.REGHANDLERCARDNO)) {
                        this.$message({
                            type: "error",
                            message: "家属身份证号码有误！"
                        });
                        return;
                    }
                }
            }
            //义乌火化登记新增 --是否冻结
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            }
            //义乌火化登记新增 --是否出具死亡证明
            if (data.REGISPOD === "是") {
                data.REGISPOD = "B";
            } else if (data.REGISPOD === "否") {
                data.REGISPOD = "A";
            }
            this.$store.state.isloading = true;
            //火化登记新增
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.CremationRegistration_YW,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //取消
                    this.openDialog();
                    this.refreshData();
                    if (this.isUse === 1) {
                        this.RegisterCreate(res.data.content.REGID);
                    }
                    this.$message({
                        type: "success",
                        message: "登记成功!"
                    });
                    if (this.IsPrintJointOrder) {
                        this.joint(res.data.content.REGID);
                    }
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //信息核对后新增
        dataAdds(checkout = false) {
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.showselect == "1") {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCRELEVEL: this.regData.REFCRELEVEL,
                    REFCARID: this.cdhdataEexend.cardata2[1]
                };
            }
            if (this.IsxialaNB == true) {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCREID: this.regData.REFCREID,
                };
            }
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER,
                    List_Carry:this.cdhdata.List_Carry,  //接运员传值给后台
                };
            }
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null && this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }

            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }

                if (
                    data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                    data.REGHANDLERCARDNO.length > 0
                ) {
                    if (!codeValid(data.REGHANDLERCARDNO)) {
                        this.$message({
                            type: "error",
                            message: "家属身份证号码有误！"
                        });
                        return;
                    }
                }
            }
            data.BARID = this.olddatas;
            data.REGLBPRPID = this.REGLBPRPID;
            //是否出具死亡证明
           if (data.REGISPOD === "是") {
                data.REGISPOD = "B";
            } else if (data.REGISPOD === "否") {
                data.REGISPOD = "A";
            } else {
                data.REGISPOD = "";
            }
               //信息核对后新增---是否冻结
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            } else {
                data.REGFROZEN = "";
            }
            this.$store.state.isloading = true;
            let url
            if(this.order=="在馆内联办匹配修改"){
             data.REGYITIQX =  this.regData.REGYITIQX;
             url=apiBase.getApiAdress().Registration.DataPushHFByReg;
            }
            else{
            url=apiBase.getApiAdress().Registration.DataPushHFByPrp
            }
            //火化登记新增
            apiBase.DoService(
                data,
                url,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.$refs.dialog.close();
                    // 搜索出匹配的数据
                    if (this.olddatas) {
                        this.$emit("searchMatchData", this.olddatas);
                    }
                    this.$message({
                        type: "success",
                        message: "登记成功!"
                    });
                    if (this.IsRegistrationGoToCheck=='10') {
                        this.joint(res.data.content.REGID);
                    }
                    else if(this.IsRegistrationGoToCheck=='20'){
                        this.openDialog();
                    }
                    this.refreshData();
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //遗体外运登记新增
        dataAddOutage(checkout = false) {   
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER,
                    List_Carry:this.cdhdata.List_Carry,
                };
            }
            // data.LINID = this.getLinId(this.regData.LINNAME);
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null && this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }
            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }
                if (
                    data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                    data.REGHANDLERCARDNO.length > 0
                ) {
                    if (!codeValid(data.REGHANDLERCARDNO)) {
                        this.$message({
                            type: "error",
                            message: "家属身份证号码有误！"
                        });
                        return;
                    }
                }
            }
            if (data.REGISPOD === "是") {
                data.REGISPOD = "B";
            } else if (data.REGISPOD === "否") {
                data.REGISPOD = "A";
            } else {
                data.REGISPOD = "";
            }
            if (this.IsMatchingJointData) {
                data.REGLBPRPID = this.REGLBPRPID; // 要加个判断 （遗体外运）
            }
            this.$store.state.isloading = true;
            // data.regCremationDate
            //火化登记新增
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.BodyoutageRegistration,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //取消
                    this.$message({
                        type: "success",
                        message: "登记成功!"
                    });
                    this.openDialog(); //是否划价
                    this.refreshData(); //刷新页面
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //登记修改
        dataModify(checkout = false) { 
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.showselect == "1") {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCRELEVEL: this.regData.REFCRELEVEL,
                    REFCARID: this.cdhdataEexend.cardata2[1]
                };
            }
             if (this.IsxialaNB == true) {
                data.Ref = {
                    REFMEMID: this.regData.REFMEMID,
                    REFLINID: this.regData.REFLINID,
                    REFCREID: this.regData.REFCREID,
                };
            }
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            data.REGID = this.regids;
            if (this.IsMatchingJointData) {
                data.REGLBPRPID = this.REGLBPRPID; // 要加个判断
            }
            if (this.cdhdataEexend.cardata3[1]) {
                data.PoliteCdh = {
                    CDHCARID: this.cdhdataEexend.cardata3[1],
                    CDHMILEAGE: this.PoliteCdh.CDHMILEAGE
                };
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER, //null
                    List_Carry:this.cdhdata.List_Carry,
                };
            }
            // data.LINID = this.regData.LINNAME;
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null && this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }
            data.REGCREMATIONDATE = data.REGCREMATIONDATE || ''
            data.REGBIRTHDATE = data.REGBIRTHDATE || ''
            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }
            }
            if (
                data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                data.REGHANDLERCARDNO.length > 0
            ) {
                if (!codeValid(data.REGHANDLERCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "家属身份证号码有误！"
                    });
                    return;
                }
            }
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            } else {
                data.REGFROZEN = "";
            }
            // this.$store.state.isloading = true;
            //火化登记修改
            if(data.REGCREMATIONDATE == null) data.REGCREMATIONDATE = ""; 
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.ModifyCremationRegistration,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //关闭页面
                    if (this.isUse === 1) {
                        this.RegisterCreate(res.data.content.REGID);
                    }
                    this.$message({
                        type: "success",
                        message: "修改成功!"
                    });
                    this.openDialog();
                    this.refreshData();
                    // if (checkout === true) {
                    //   this.$refs.checkadd.open(ORDER.CHEMODIFY, res.data.content.CHDID);
                    // }
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //登记修改（义乌）
        dataModifyyw(checkout = false) {
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            data.REGID = this.regids;
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER, //null
                    List_Carry:this.cdhdata.List_Carry,
                };
            }
            // data.LINID = this.regData.LINNAME;
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null &&this.regDataEexend.regCremationDate != null&& this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }
            data.REGCREMATIONDATE = data.REGCREMATIONDATE || ''
            data.REGBIRTHDATE = data.REGBIRTHDATE || ''
            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }
            }
            if (
                data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                data.REGHANDLERCARDNO.length > 0
            ) {
                if (!codeValid(data.REGHANDLERCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "家属身份证号码有误！"
                    });
                    return;
                }
            }
            if (data.REGISPOD === "是") {
                data.REGISPOD = "B";
            } else if (data.REGISPOD === "否") {
                data.REGISPOD = "A";
            } else {
                data.REGISPOD = "";
            }
            //义乌登记修改--是否冻结
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            } else {
                data.REGFROZEN = "";
            }
            // this.$store.state.isloading = true;
            //火化登记修改
            let url
            if(this.NEIREGID){
                url=apiBase.getApiAdress().Registration.DataPushHFByReg
            }else{
                url=apiBase.getApiAdress().Registration.ModifyCremationRegistration_YW
            }
            apiBase.DoService(
                data,
                url,
                res => {
                    if (this.isAdd == true) {
                        //接尸地址 修改
                        data.REGCYADDRESS = this.arr[this.arr.length - 1];
                        //--------------
                    }
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //关闭页面
                    if (this.isUse === 1) {
                        this.RegisterCreate(res.data.content.REGID);
                    }
                    this.$message({
                        type: "success",
                        message: "修改成功!"
                    });
                    this.openDialog();
                    this.refreshData();
                    // if (checkout === true) {
                    //   this.$refs.checkadd.open(ORDER.CHEMODIFY, res.data.content.CHDID);
                    // }
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },

        //遗体外运登记修改
        dataModifyOutage(checkout = false) {
            if(this.GuHuiArea.length!=0){
            this.regData.ASSID = this.GuHuiArea[this.GuHuiArea.length - 1];
            }else{
            this.regData.ASSID=null;
            }
            this.regData.REGADDID = this.carryArea[this.carryArea.length - 1];
            if(this.Isshowcz==true){
            this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];
            }
            let data = JSON.parse(JSON.stringify(this.regData));
            if (this.isAdd == true) {
                //接尸地址
                data.REGCYADDRESS = this.arr[this.arr.length - 1];
                //--------------
            }
            if (this.cdhdata.CDHCARID) {
                if(this.Isshowjyy==true){  //接运员新增
                this.cdhdata.List_Carry=[]
                this.collectMember.forEach((item,index) => {
                var STANAME={ STANAME:'' }
                this.cdhdata.List_Carry.push(STANAME)
                 this.cdhdata.List_Carry[index].STANAME=item
                })
                }else{}
                data.Cdh = {
                    CDHCARID: this.cdhdata.CDHCARID,
                    CDHMILEAGE: this.cdhdata.CDHMILEAGE,
                    CDHDRIVER: this.cdhdata.CDHDRIVER, //null
                    List_Carry:this.cdhdata.List_Carry,
                };
            }
            // data.LINID = this.regData.LINNAME;
            if (this.cdhdata.CDHACTUALDATE) {
                data.Cdh.CDHACTUALDATE = formatDate(
                    this.cdhdata.CDHACTUALDATE,
                    "yyyyMMdd"
                );
            }
            if (this.cdhdata.CDHACTUALTIME) {
                data.Cdh.CDHACTUALTIME = formatDate(
                    this.cdhdata.CDHACTUALTIME,
                    "hhmmss"
                );
            }
            // 死亡日期不能大于火化日期
            if (
                this.regDataEexend.regDeathDate != null && this.regDataEexend.regCremationDate != null&& this.regDataEexend.regDeathDate != "" && this.regDataEexend.regCremationDate != ""
            ) {
                let start = this.regDataEexend.regDeathDate;
                let end = this.regDataEexend.regCremationDate;
                let starttimes =
                    start.getFullYear() +
                    "-" +
                    (start.getMonth() + 1) +
                    "-" +
                    start.getDate();
                let endtimes =
                    end.getFullYear() +
                    "-" +
                    (end.getMonth() + 1) +
                    "-" +
                    end.getDate();
                let deadtime = new Date(starttimes).getTime();
                let huohuatime = new Date(endtimes).getTime();
                if (deadtime > huohuatime) {
                    this.$message({
                        type: "error",
                        message: "死亡日期不能大于火化日期！"
                    });
                    return;
                }
            }
            if (
                data.REGCARDTYPE === "内地居民身份证" &&
                data.REGBONETYPE === "有名尸"
            ) {
                if (!codeValid(data.REGCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "逝者身份证号码有误！"
                    });
                    return;
                }
            }
            if (
                data.REGHANDLERCARDTYPE === "内地居民身份证" &&
                data.REGHANDLERCARDNO.length > 0
            ) {
                if (!codeValid(data.REGHANDLERCARDNO)) {
                    this.$message({
                        type: "error",
                        message: "家属身份证号码有误！"
                    });
                    return;
                }
            }
            if (this.IsMatchingJointData) {
                data.REGLBPRPID = this.REGLBPRPID; // 要加个判断 （遗体外运修改）
            }
            if (data.REGISPOD === "是") {
                data.REGISPOD = "B";
            } else if (data.REGISPOD === "否") {
                data.REGISPOD = "A";
            } else {
                data.REGISPOD = "";
            }
               //遗体外运修改---是否冻结
            if (data.REGFROZEN === "是") {
                data.REGFROZEN = "B";
            } else if (data.REGFROZEN === "否") {
                data.REGFROZEN = "A";
            } else {
                data.REGFROZEN = "";
            }
            // this.$store.state.isloading = true;
            //火化登记修改
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Registration.BodyoutageRegistration,
                res => {
                    this.REGISCHECK = res.data.content.REGISCHECK;
                    this.chdids = res.data.content.CHDID;
                    this.closeDialog(); //关闭页面
                    this.$message({
                        type: "success",
                        message: "修改成功!"
                    });
                    this.openDialog();
                    this.refreshData();
                    // if (checkout === true) {
                    //   this.$refs.checkadd.open(ORDER.CHEMODIFY, res.data.content.CHDID);
                    // }
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },

        //登记详情
        dataInfo(id,key,ids) {
            let data
            let url
            if(key=="case"){    //在馆内联办匹配显示详情
                data = {
                    REGPRPID: this.REGPRPID,
                    REGLBPRPID: ids,
                    REGID: id
                };
                url= apiBase.getApiAdress().Registration.DataPushHFByRegNos
            }else{
                data = {
                    REGID: id
                };
                url= apiBase.getApiAdress().Registration.DetailCremationRegistration
            }
            apiBase.DoService(   
                    data,
                    url,
                    res => {
                    this.regData.REGLBPRPID = res.data.content.REGLBPRPID
                    this.REGLBPRPID = res.data.content.REGLBPRPID
                    this.regData.REGPRPID = res.data.content.REGPRPID
                    if(res.data.content.REGYITIQX){
                    this.regData.REGYITIQX = res.data.content.REGYITIQX;
                    }
                    if (this.showselect == "1") {
                        this.regData.REFMEMID = res.data.content.REFMEMID;
                        this.regData.REFLINID = res.data.content.REFLINID;
                        this.regData.REFCRELEVEL = res.data.content.REFCRELEVEL;
                        this.cdhdataEexend.cardata2 = [
                            res.data.content.REFCARLEVEL,
                            res.data.content.REFCARID
                        ];
                    }
                    if (this.IsxialaNB == true) {
                        this.regData.REFMEMID = res.data.content.REFMEMID;
                        this.regData.REFLINID = res.data.content.REFLINID;
                        this.regData.REFCREID = res.data.content.REFCREID;
                    }
                    this.regData.REGBONETYPE = res.data.content.REGBONETYPE; //逝者类型   
                    if(this.regData.REGBONETYPE == '异地火化'){
                     this.syYdhh = true;
                     this.noshow=true;
                    } else{
                     this.syYdhh = false;
                     this.noshow = false;
                    }
                    this.regData.REGSUBFUNERAL = res.data.content.REGSUBFUNERAL; //火化殡仪馆
                    this.regData.REGBONETYPE2 =
                        res.data.content.REGBONETYPEDESC;
                    this.regData.REGSEX = res.data.content.REGSEX; //逝者性别
                    this.regData.REGSEXDESC = res.data.content.REGSEXDESC;
                    if(res.data.content.REGCARDTYPE==""){
                        this.regData.REGCARDTYPE="内地居民身份证"
                    }else{
                    this.regData.REGCARDTYPE = res.data.content.REGCARDTYPE; //证件类型
                    }
                   
                    this.regData.REGNAME = res.data.content.REGNAME; //逝者姓名
                    this.regData.REGCARDNO = res.data.content.REGCARDNO; //证件号码
                    this.regData.REGDETAILADDRESS =
                        res.data.content.REGDETAILADDRESS; //详细地址
                    this.regData.REGAGE = res.data.content.REGAGE; //逝者年龄
                    this.regData.REGDAYNUM = res.data.content.REGDAYNUM; //排队序号
                    if (res.data.content.REGNATION == "") {
                        this.regData.REGNATION = this.mz[0].CODNAME; //，默认民族
                    } else {
                        this.regData.REGNATION = res.data.content.REGNATION; //民族
                    }
                    if (res.data.content.REGHOUSEHOLDTYPE == "") {
                        this.regData.REGHOUSEHOLDTYPE = this.hjlblx[1].CODNAME; //户籍类别
                    } else {
                        this.regData.REGHOUSEHOLDTYPE =
                            res.data.content.REGHOUSEHOLDTYPE; //户籍类别
                    }
                    this.regData.REGHANDSEX = res.data.content.REGHANDSEX; //家属性别
                    this.regData.REGHANDSEXDESC =
                        res.data.content.REGHANDSEXDESC; //详情中的家属性别
                    if(res.data.content.REGHANDLERCARDTYPE==""){
                        this.regData.REGHANDLERCARDTYPE="内地居民身份证"
                    }else{
                    this.regData.REGHANDLERCARDTYPE = res.data.content.REGHANDLERCARDTYPE; //证件类型
                    }
                    this.regData.REGHANDLERNAME =
                        res.data.content.REGHANDLERNAME; //家属姓名
                    this.regData.REGHANDLERCARDNO =
                        res.data.content.REGHANDLERCARDNO; //证件号码
                    this.regData.REGHANDLERHOUSEHOLD =
                        res.data.content.REGHANDLERHOUSEHOLD; //详细地址
                    this.regData.REGHANDLERLINK =
                        res.data.content.REGHANDLERLINK; //联系电话
                    this.regData.REGRELATION = res.data.content.REGRELATION; //逝者关系
                    if (res.data.content.REGISKEYPOINT == "") {
                        this.regData.REGISKEYPOINT = this.jmlx[0].CODNAME; // 减免类型
                    } else {
                        this.regData.REGISKEYPOINT =
                            res.data.content.REGISKEYPOINT; //减免类型
                    }
                    this.regData.REGISKEYPOINTDESC =
                        res.data.content.REGISKEYPOINTDESC; //详情中的减免类型
                    if (res.data.content.REGGHQX == "") {
                        this.regData.REGGHQX = this.ghqx[0].CODNAME; //骨灰去向   
                    } else {
                        this.regData.REGGHQX = res.data.content.REGGHQX; //骨灰去向
                    }
                    this.isShowght(this.regData.REGGHQX); //如果骨灰去向是寄存的话，显示骨灰堂字段
                    this.regData.REGGHQXDESC = res.data.content.REGGHQXDESC; //详情骨灰去向
                    //匹配骨灰堂第一项添加子集进去 （临海）通用 修改展示
                    if(this.columbarium.length!=0){
                    this.columbarium.map(sitem => {
                        if(sitem.value == res.data.content.ASAID){
                            sitem.children.push({
                            label: res.data.content.ASSNAME,
                            value: res.data.content.ASSID
                            })
                        }
                    });
                    }
                    this.GuHuiArea = [res.data.content.ASAID,res.data.content.ASSID]; //骨灰堂下拉
                    this.ASSNAMEDESC=res.data.content.ASSNAME?res.data.content.ASANAME+'/'+res.data.content.ASSNAME:null //详情骨灰堂
                    // ----------
                    this.regData.REGCYADDRESS = res.data.content.REGCYADDRESS; //接尸地址  常用地址
                    this.regData.REGADDRESS = res.data.content.REGADDRESS; //接运地点
                    this.regData.REGREMARK = res.data.content.REGREMARK; //备注
                    this.regData.REGCRETYPEDESC = res.data.content.REGCRETYPEDESC; //火化炉
                    this.regData.REGCRETYPE = res.data.content.REGCRETYPE; // 火化炉
                    if(this.IsshowNB==true){
                        this.regData.REGCRESERIALNUMBER = res.data.content.REGCRESERIALNUMBER; //炉号 宁波
                    }
                    if (res.data.content.REGISUSEJOINT === "") {
                        this.regData.REGISUSEJOINT = "B";
                    } else {
                        this.regData.REGISUSEJOINT =
                            res.data.content.REGISUSEJOINT;
                    }
                    //是否冻结 
                    if (res.data.content.REGFROZEN === "B") {
                        this.regData.REGFROZEN = "是";
                    } else if (res.data.content.REGFROZEN === "A") {
                       this.regData.REGFROZEN = "否";
                    }
                    //是否联办
                    if (res.data.content.REGISPOD === "A") {
                        this.regData.REGISPOD = "否";
                    } else if (res.data.content.REGISPOD === "B") {
                        this.regData.REGISPOD = "是";
                    } else {
                        this.regData.REGISPOD = "";
                    }
                    if (this.IsRegSendUse) {
                        // this.regData.ICENO = resdata.Ich.ICENO;
                        this.regData.ICENO = res.data.content.ICENO; //冰柜号
                    }
                    // else{
                    //   this.regData.ICENO = res.data.content.ICENO;//冰柜号
                    // }
                    else if(this.isshowhuo_lh==true){
                    this.regData.ICENO = res.data.content.ICENO;//冰柜号 (临海)
                    }
                    else if(this.IsshowNB==true){
                    this.regData.ICENO = res.data.content.ICENO;//冰柜号 (宁波)
                    }
                    this.regData.MEMNAME = res.data.content.MEMNAME; //悼念厅
                    this.regData.LINNAME = res.data.content.LINNAME; //灵堂号
                    this.regData.LINID = res.data.content.LINID;
                    ORDER.LINID = res.data.content.LINID;
                    //舟山获得新下拉值
                    ORDER.REFMEMID = res.data.content.REFMEMID;
                    ORDER.REFLINID = res.data.content.REFLINID;
                    if(this.IsxialaNB == true){
                    ORDER.REFCREID = res.data.content.REFCREID;
                    }
                    ORDER.CARIDDESC = res.data.content.CARIDDESC;
                    this.regData.ICEID = res.data.content.ICEID; //冰柜号
                    ORDER.ICEID = res.data.content.ICEID;

                    this.regData.REGID = res.data.content.REGID;
                    this.regData.REGHOUSEHOLDDESC =
                        res.data.content.REGHOUSEHOLDDESC; //详情中的户籍地址
                    var arr = this.regData.REGHOUSEHOLDDESC.split(" ");

                    this.regData.REGCAUSADESC = res.data.content.REGCAUSADESC; //详情中的死亡原因

                    this.regData.REGCAUSA = res.data.content.REGCAUSA;
                    this.regData.REGCAUSASON = res.data.content.REGCAUSASON;
                    if(res.data.content.REGHOUSETYPE=="国内")  {
                        if (res.data.content.REGHOUSEHOLD == "") {
                            // 地址类型
                            this.getHouseholdInfo(this.$store.state.orginCode);
                        } else{
                            this.regData.REGHOUSEHOLD=res.data.content.REGHOUSEHOLD
                        }
                    }
                    this.regData.REGHOUSETYPE =res.data.content.REGHOUSETYPE;
                    this.regData.REGADDID = res.data.content.REGADDID;
                   if(this.Isshowcz==true){   this.regData.REGFINANCESBELONG =  res.data.content.REGFINANCESBELONG ; } // 财政归属详情
                    this.carryAreaInfo = this.regData.REGADDRESS;
                    this.regDateTimeInfo = timeStringToDate(
                        //详情中的到馆时间
                        res.data.content.REGTIME,
                        res.data.content.REGDATE
                    );
                    this.regDataEexend.regDataTime = timeStringToDate(
                        //修改中的到馆时间
                        res.data.content.REGTIME,
                        res.data.content.REGDATE
                    );
                    this.regDataEexend.RegBirthDate = dateStringToDate(
                        //出生日期
                        res.data.content.REGBIRTHDATE
                    );
                    this.regDataEexend.regDeathDate = dateStringToDate(
                        //死亡时间
                        res.data.content.REGDEATHDATE
                    );
                    this.regDataEexend.regCremationDate = dateStringToDate(  
                        //火化日期
                        res.data.content.REGCREMATIONDATE
                    );
                    if(!this.isRegisDefaultCreSameday){  //默认执行
                        if (this.regDataEexend.regCremationDate == null || this.regDataEexend.regCremationDate == "") {
                            this.regDataEexend.regCremationDate = new Date();
                        }
                    }
                    
                    let PoliteCdh = res.data.content.PoliteCdh;
                    if (PoliteCdh) {
                        (this.cdhdataEexend.cardata3 = [
                            PoliteCdh.CARCODNAME,
                            PoliteCdh.CDHCARID
                        ]),
                            (this.PoliteCdh.CDHMILEAGE = PoliteCdh.CDHMILEAGE),
                            (this.PoliteCdh.CDHCARID = PoliteCdh.CDHCARID),
                            (this.PoliteCdh.CARLIC = PoliteCdh.CARLIC);
                    }
                    // 未结账火化
                    this.regData.REGISONCHECKCREMA =
                        res.data.content.REGISONCHECKCREMA;
                    this.regData.REGISONCHECKCREMADESC =
                        res.data.content.REGISONCHECKCREMADESC;
                    this.regData.REGISCODE = res.data.content.REGISCODE;
                    this.regData.REGISCODEDESC = res.data.content.REGISCODEDESC;
                    let cdhdata = res.data.content.Cdh;
                    if (cdhdata) {
                        this.cdhdataEexend.cardata = [
                            cdhdata.CARCODNAME,
                            cdhdata.CDHCARID
                        ];
                        this.cdhdata.CARLIC = cdhdata.CARLIC;
                        this.cdhdata.CDHDRIVER = cdhdata.CDHDRIVER;
                        this.cdhdata.CDHMILEAGE = cdhdata.CDHMILEAGE;
                        this.cdhdata.STANAME = cdhdata.STANAME;
                        this.cdhdata.CDHACTUALDATE = dateStringToDate(
                            cdhdata.CDHACTUALDATE
                        );
                        // this.cdhdata.CDHACTUALTIME = formatDate(cdhdata.CDHACTUALTIME, "hhmm");
                        this.cdhdata.CDHACTUALTIME = timeStringToDate(
                            cdhdata.CDHACTUALTIME
                        );
                        if (
                            !this.drivers.some(item => {
                                return item.value == cdhdata.CDHDRIVER;
                            })
                        ) {
                            this.drivers.push({
                                label: cdhdata.STANAME,
                                value: cdhdata.CDHDRIVER
                            });
                        }
                        let findarry = this.carLics.filter(item => {
                            return item.value === cdhdata.CARCODNAME;
                        });
                        if (findarry.length > 0) {
                            let seachCarType = findarry[0];
                            if (
                                !seachCarType.children.some(item => {
                                    return item.value === cdhdata.CDHCARID;
                                })
                            )
                            seachCarType.children.push({
                                label: cdhdata.CARLIC,
                                value: cdhdata.CDHCARID
                            });
                        }
                        if(this.Isshowjyy==true){
                        this.carriersinfo = cdhdata.CarryName  //接运员详情  宁波个性化需求 登记详情
                        if(res.data.content.Cdh.list_CarryArr){
                        this.collectMember= cdhdata.list_CarryArr
                        }
                        }
                    }
                    //初始化死亡原因
                    this.cauinfos = [
                        this.regData.REGCAUSA,
                        this.regData.REGCAUSASON
                    ];
                    // this.ctyLists = res.data.content.REGHOUSEHOLDDESC;
                    //初始化户籍地址

                    this.getHouseholdInfo(res.data.content.REGHOUSEHOLD);
                    let currentArea = [];
                    let addrId = this.regData.REGADDID;
                    let addrName = null;
                    this.area.forEach(function(value, index, arr) {
                        if(value.value==addrId){
                            currentArea.push(value.ADDTOPID, value.value);
                            addrName = value.label;
                        }else{
                            if(value.children){
                                value.children.forEach(function(v, i, a) {
                                if (v.value == addrId) {
                                    currentArea.push(v.ADDTOPID, v.value);
                                    addrName = value.label + " / " + v.label;
                                    }
                                });
                            }
                        }
                    });
                    this.carryArea = currentArea;
                    this.addressInfo = addrName;
                    if(this.Isshowcz==true){     //财政归属详情
                        let addrId2 = this.regData.REGFINANCESBELONG;
                        let currentArea2 = [];
                        let addrName2 = null;
                        this.area.forEach(function(value, index, arr) {
                        value.children.forEach(function(v, i, a) {
                            if (v.value == addrId2) {
                                currentArea2.push(v.ADDTOPID, v.value);
                                addrName2 = value.label + " / " + v.label;
                            }
                        });
                    });
                     this.carryCai = currentArea2;
                     this.caiInfo = addrName2;
                     this.regData.REGFINANCESBELONG = this.carryCai[this.carryCai.length - 1];   
                    }
                    this.gethallnumber();
                    this.getMemorialhall();
                    this.getCremahall();
                    this.getnoIce();
                    //多级地址选择详情   isaddress
                    if (this.isAdd == true && this.regData.REGCYADDRESS) {
                        apiBase.DoService(
                            { AFCID: this.regData.REGCYADDRESS },
                            apiBase.getApiAdress().Reserve.GetBoroughByID,
                            res => {
                                this.arr = res.data.content; //地址选择详情
                            }
                        );
                    }
                }
            );
        },
        // 未到馆的详情
        // WDGdataInfo(id) {
        //   let data = {
        //     REGID: id
        //   };
        //   apiBase.DoService(
        //     data,
        //     apiBase.getApiAdress().Registration.DetailCremationRegistration,
        //     res => {
        //       this.regData.REGSEX = res.data.content.PRPDEADSEX; //逝者性别
        //       this.regData.REGSEXDESC = res.data.content.PRPDEADSEXDESC;
        //       this.regData.REGNAME = res.data.content.PRPDEADNAME; //逝者姓名
        //       this.regData.REGDETAILADDRESS = res.data.content.PRPCORPSEADDRESS; //详细地址
        //       this.regData.REGAGE = res.data.content.PRPDEADAGE; //逝者年龄
        //       this.regData.REGHANDLERNAME = res.data.content.PRPLINKMAN; //家属姓名
        //       this.regData.REGHANDLERLINK = res.data.content.PRPLINKPHONE; //联系电话
        //       this.regData.REGREMARK = res.data.content.PRPDESCRIBE; //备注
        //       this.regData.REGCAUSADESC = res.data.content.PRPCAUSADESC; //详情中的死亡原因
        //       let cdhdata = res.data.content.Cdh;
        //       if (cdhdata) {
        //         this.cdhdataEexend.cardata = [cdhdata.CARCODNAME, cdhdata.CDHCARID];
        //         this.cdhdata.CARLIC = cdhdata.CARLIC;
        //         this.cdhdata.STANAME = cdhdata.STANAME;
        //       }
        //       if (res.data.content.REGISPOD === "A") {
        //         this.regData.REGISPOD = "否";
        //       } else if (res.data.content.REGISPOD === "B") {
        //         this.regData.REGISPOD = "是";
        //       } else {
        //         this.regData.REGISPOD = "";
        //       }
        //     }
        //   );
        // },
        refreshData() {
            this.$emit("refreshData");
        },
        //数据重置
        dataRepeat() {
            this.arr = []; //地址选择清空
            this.chlLists = [];
            this.cardInfo = [];
            Object.assign(this.$data.regData, this.$options.data().regData);
            Object.assign(
                this.$data.regDataEexend,
                this.$options.data().regDataEexend
            );
            Object.assign(this.$data.cdhdata, this.$options.data().cdhdata);
            Object.assign(
                this.$data.cdhdataEexend,
                this.$options.data().cdhdataEexend
            );
            this.regDataEexend.regDataTime = null;
            this.regData.ICENO = null;
            this.causList = [];
            this.ctyLists = [];
            this.cauinfos = [];
            this.carryArea = [];
            this.GuHuiArea = [];
            this.carryCai = [];   //财政归属
            this.carryjyy = [];   //财政归属
            this.cdhdata.List_Carry=[] //接运员传值
            this.collectMember=[] //选中接运员的值
            this.jsdata = [];
            this.isshowght = false;
            if (this.order === ORDER.SELFREGISTER) {
                this.cdhdataEexend.cardata = ["自送", null];
            }
            if (this.order === "异地火化") {
                this.cdhdataEexend.cardata = ["自送", null];
            }
            this.PoliteCdh = {
                CDHCARID: null,
                CDHMILEAGE: null,
                CARLIC: null
            };
            this.REGLBPRPID= '';
            this.NEIREGID=null;
            // if (this.$store.state.orginCode) {
            //   this.getHouseholdInfo(this.$store.state.orginCode);
            // }
        },
        //快速登记的时候读取身份证
        readDeads() {
            if(ORDER.Highmeter=='30'){
                 var instance = axios.create({
                baseURL: 'http://localhost:9528/',
                headers: {
                    'Access-Code': accesscode,
                }
            })
            instance.get('/IDCard').then((response)=> {
                // Do something here
                if(response.data!='')
                {
                var showdata=response.data
                this.datalist=showdata
                }
              if(response.data.error!=''){
                  this.regData.REGSEX=''
                  this.$message.error("身份证读取失败，请重新放置。");
                }
            
            })
            .then( ()=>{
                if(this.datalist!=''){
                this.regData.REGCARDTYPE = "内地居民身份证";
                this.REGNAMES=this.datalist.name;
                this.REGDETAILADDRESSA=this.datalist.address
                    if(this.datalist.gender!=''){
                        if(this.datalist.gender=='2'){
                        this.regData.REGSEX='B'
                        }else if(this.datalist.gender=='1'){
                            this.regData.REGSEX='A'
                        }
                    }
                     this.REGCARDNOS = this.datalist.code;  //证件号
                    }
                   
                 else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                })
            }else if(ORDER.Highmeter=='10'){
                if (this.cardInfo && this.cardInfo.length > 0) {
                    this.regData.REGCARDTYPE = "内地居民身份证";
                    this.REGCARDNOS = this.cardInfo[7];
                    this.REGDETAILADDRESSA = this.cardInfo[6];
                    this.regData.REGSEX = this.sex(this.cardInfo[1]);
                    if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                        this.REGNAMES = this.cardInfo[0].substring(11);
                    } else {
                        this.REGNAMES = this.cardInfo[0];
                    }
                } else {
                    this.$message.error("身份证读取失败，请重新放置。");
                }
                this.cardInfo = [];    
            }else if(ORDER.Highmeter=='40'){
                 dialog.get_actionType("singleReadIDCard");
                 setTimeout(() => {
                    if (this.cardInfo && this.cardInfo.length > 0) {
                        this.regData.REGCARDTYPE = "内地居民身份证";
                        this.REGCARDNOS = this.cardInfo[7];
                        this.REGDETAILADDRESSA = this.cardInfo[6];
                        this.regData.REGSEX = this.sex(this.cardInfo[1]);
                        if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                            this.REGNAMES = this.cardInfo[0].substring(11);
                        } else {
                            this.REGNAMES = this.cardInfo[0];
                        }
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    this.cardInfo = [];
                 }, 1000);
             }
        },
        //快速登记的时候读取身份证(联办)
        readDeadss() {
             if(ORDER.Highmeter=='30'){
                      var instance = axios.create({
                baseURL: 'http://localhost:9528/',
                headers: {
                    'Access-Code': accesscode,
                }
            })
            instance.get('/IDCard').then((response)=> {
                // Do something here
                if(response.data!='')
                {
                var showdata=response.data
                this.datalist=showdata
                }
              if(response.data.error){
                  this.$message.error("身份证读取失败，请重新放置。");
                }
            
            })
            .then( ()=>{
                if(this.datalist!=''){
                      this.REGCARDNOS = this.datalist.code;  
                      this.getLianbanData();
                    }
                   
                 else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                })
             }else if(ORDER.Highmeter=='10'){
                if (this.cardInfo && this.cardInfo.length > 0) {
                    this.REGCARDNOS = this.cardInfo[7];
                    this.getLianbanData();
                } else {
                    this.$message.error("身份证读取失败，请重新放置。");
                }
                this.cardInfo = [];
             }else if(ORDER.Highmeter=='40'){
                 dialog.get_actionType("singleReadIDCard");
                 setTimeout(() => {
                    if (this.cardInfo && this.cardInfo.length > 0) {
                        this.REGCARDNOS = this.cardInfo[7];
                        this.getLianbanData();
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    this.cardInfo = [];
                 }, 1000);
             }
        },
    
        //读取逝者身份证
        readDead() {
            switch (ORDER.Highmeter) {
                case "10":
                    if (this.cardInfo && this.cardInfo.length > 0) {
                        this.regData.REGCARDTYPE = "内地居民身份证";
                        if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                            if (
                                this.regData.REGNAME != null &&
                                this.cardInfo[0].substring(11) !=
                                    this.regData.REGNAME &&
                                this.nameischongfus == true
                            ) {
                                let name = this.cardInfo[0].substring(11);
                                const h = this.$createElement;
                                this.$msgbox({
                                    title: "提示",
                                    message: h("p", null, [
                                        h(
                                            "span",
                                            null,
                                            "逝者姓名不一致，是否覆盖？ "
                                        )
                                    ]),
                                    showCancelButton: true,
                                    confirmButtonText: "确定",
                                    cancelButtonText: "取消",
                                    beforeClose: (action, instance, done) => {
                                        if (action === "confirm") {
                                            done();
                                        } else {
                                            done();
                                        }
                                    }
                                }).then(action => {
                                    this.regData.REGNAME = name;
                                });
                            } else {
                                this.regData.REGNAME = this.cardInfo[0].substring(
                                    11
                                );
                            }
                        } else {
                            this.regData.REGNAME = this.cardInfo[0];
                        }
                        this.regData.REGSEX = this.sex(this.cardInfo[1]);
                        this.regData.REGCARDNO = this.cardInfo[7];
                        this.regData.REGDETAILADDRESS = this.cardInfo[6];
                        this.regData.REGNATION = this.cardInfo[2] + "族";
                        this.regDataEexend.RegBirthDate = dateStringToDate(
                            this.cardInfo[3] +
                                this.cardInfo[4] +
                                this.cardInfo[5]
                        );
                        this.birthdaydata(this.regDataEexend.RegBirthDate);
                        this.identityNumberBlur(this.cardInfo[7]); //根据身份证号码匹配联办数据
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    this.cardInfo = [];
                    break;
                case "20":
                    if (textnum.text1 != "") {
                        this.regData.REGNAME = textnum.text1;
                        this.regData.REGCARDTYPE = "内地居民身份证";
                        this.regData.REGSEX = this.sex(textnum.text3);
                        this.regData.REGCARDNO = textnum.text2;
                        this.regData.REGDETAILADDRESS = textnum.text6;
                        this.regData.REGNATION = textnum.text4 + "族";
                        this.regDataEexend.RegBirthDate = dateStringToDate(
                            //出生日期
                            textnum.text5
                        );
                        this.birthdaydata(this.regDataEexend.RegBirthDate);
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    textnum.text1 = "";
                    textnum.text2 = "";
                    textnum.text3 = "";
                    textnum.text4 = "";
                    textnum.text6 = "";
                    break;
                //读取逝者身份证 （捷宇）
                case "30":
                        var instance = axios.create({
                        baseURL: 'http://localhost:9528/',
                        headers: {
                            'Access-Code': accesscode,
                        }
                    })
                    instance.get('/IDCard').then((response)=> {
                        // Do something here
                        if(response.data!='')
                        {
                        var showdata=response.data
                        this.datalist=showdata
                        }
                    if(response.data.error){
                        this.regData.REGAGE='';
                        this.regData.REGSEX='';
                        this.$message.error("身份证读取失败，请重新放置。");
                        }
                    
                    })
                    .then( ()=>{
                        if(this.datalist!=''){
                        // this.showclick=true
                        this.regData.REGCARDTYPE = "内地居民身份证";
                        this.regData.REGNAME=this.datalist.name;
                        this.regData.REGDETAILADDRESS=this.datalist.address
                            if(this.datalist.gender!=''){
                                if(this.datalist.gender=='2'){
                                this.regData.REGSEX='B'
                                }else if(this.datalist.gender=='1'){
                                    this.regData.REGSEX='A'
                                }
                            }
                        this.regDataEexend.RegBirthDate = dateStringToDate(
                                    //出生日期
                                this.datalist.birthDay
                                );
                        this.birthdaydata(this.regDataEexend.RegBirthDate);
                            this.regData.REGCARDNO = this.datalist.code;  //证件号
                            if(this.datalist.folk!=''){
                            var code=this.datalist.folk
                            this.regData.REGNATION=JSONZU[code]
                            }
                            }
                        
                        else {
                                this.$message.error("身份证读取失败，请重新放置。");
                            }
                        })
       
                    break;
                case "40":
                    dialog.get_actionType("singleReadIDCard");
                    setTimeout(() => {
                        if (this.cardInfo && this.cardInfo.length > 0) {
                            this.regData.REGCARDTYPE = "内地居民身份证";
                            if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                                if (
                                    this.regData.REGNAME != null &&
                                    this.cardInfo[0].substring(11) !=
                                        this.regData.REGNAME &&
                                    this.nameischongfus == true
                                ) {
                                    let name = this.cardInfo[0].substring(11);
                                    const h = this.$createElement;
                                    this.$msgbox({
                                        title: "提示",
                                        message: h("p", null, [
                                            h(
                                                "span",
                                                null,
                                                "逝者姓名不一致，是否覆盖？ "
                                            )
                                        ]),
                                        showCancelButton: true,
                                        confirmButtonText: "确定",
                                        cancelButtonText: "取消",
                                        beforeClose: (action, instance, done) => {
                                            if (action === "confirm") {
                                                done();
                                            } else {
                                                done();
                                            }
                                        }
                                    }).then(action => {
                                        this.regData.REGNAME = name;
                                    });
                                } else {
                                    this.regData.REGNAME = this.cardInfo[0].substring(
                                        11
                                    );
                                }
                            } else {
                                this.regData.REGNAME = this.cardInfo[0];
                            }
                            this.regData.REGSEX = this.sex(this.cardInfo[1]);
                            this.regData.REGCARDNO = this.cardInfo[7];
                            this.regData.REGDETAILADDRESS = this.cardInfo[6];
                            this.regData.REGNATION = this.cardInfo[2] + "族";
                            this.regDataEexend.RegBirthDate = dateStringToDate(
                                this.cardInfo[3] +
                                    this.cardInfo[4] +
                                    this.cardInfo[5]
                            );
                            this.birthdaydata(this.regDataEexend.RegBirthDate);
                            this.identityNumberBlur(this.cardInfo[7]); //根据身份证号码匹配联办数据
                        } else {
                            this.$message.error("身份证读取失败，请重新放置。");
                        }
                        this.cardInfo = [];
                    }, 1000);
                    break; 
                default:
            }
        },
        //读取经办人身份证
        readAgent() {
            // ORDER.Highmeter = '20';
            switch (ORDER.Highmeter) {
                case "10":
                    if (this.cardInfo && this.cardInfo.length > 0) {
                        this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                        if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                            this.regData.REGHANDLERNAME = this.cardInfo[0].substring(
                                11
                            );
                        } else {
                            this.regData.REGHANDLERNAME = this.cardInfo[0];
                        }
                        this.regData.REGHANDSEX = this.sex(this.cardInfo[1]);
                        this.regData.REGHANDLERCARDNO = this.cardInfo[7];
                        this.regData.REGHANDLERHOUSEHOLD = this.cardInfo[6];
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    this.cardInfo = [];
                    break;
                case "20":
                    if (textnum.text1 != "") {
                        this.regData.REGHANDLERNAME = textnum.text1;
                        this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                        this.regData.REGHANDSEX = this.sex(textnum.text3);
                        this.regData.REGHANDLERCARDNO = textnum.text2;
                        this.regData.REGHANDLERHOUSEHOLD = textnum.text6;
                    } else {
                        this.$message.error("身份证读取失败，请重新放置。");
                    }
                    textnum.text1 = "";
                    textnum.text2 = "";
                    textnum.text3 = "";
                    textnum.text6 = "";
                    break;
               //读取经办人身份证 （捷宇）
                case "30":
                    var instance = axios.create({
                        baseURL: 'http://localhost:9528/',
                        headers: {
                            'Access-Code': accesscode
                        }
                    })
                    instance.get('/IDCard').then((response)=> {
                        // Do something here
                        if(response.data!='')
                        {
                        var showdata=response.data
                        this.datalist=showdata
                        }
                        if(response.data.error){
                            this.regData.REGHANDSEX=''
                            this.$message.error("身份证读取失败，请重新放置。");
                        }
                    
                    })
                    .then( ()=>{
                        if(this.datalist!=''){
                        this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                        this.regData.REGHANDLERNAME=this.datalist.name;
                        this.regData.REGHANDLERHOUSEHOLD=this.datalist.address
                            if(this.datalist.gender!=''){
                                if(this.datalist.gender=='2'){
                                this.regData.REGHANDSEX='B'
                                }else if(this.datalist.gender=='1'){
                                    this.regData.REGHANDSEX='A'
                                }
                            }
                                this.regData.REGHANDLERCARDNO = this.datalist.code;  //证件号
                            }
                            
                            else {
                                this.$message.error("身份证读取失败，请重新放置。");
                            }
                        })
                        break;
                    case "40":
                        dialog.get_actionType("singleReadIDCard");
                        setTimeout(() => {
                            if (this.cardInfo && this.cardInfo.length > 0) {
                                this.regData.REGHANDLERCARDTYPE = "内地居民身份证";
                                if (this.cardInfo[0].indexOf("IDcardInfo") > -1) {
                                    this.regData.REGHANDLERNAME = this.cardInfo[0].substring(
                                        11
                                    );
                                } else {
                                    this.regData.REGHANDLERNAME = this.cardInfo[0];
                                }
                                this.regData.REGHANDSEX = this.sex(this.cardInfo[1]);
                                this.regData.REGHANDLERCARDNO = this.cardInfo[7];
                                this.regData.REGHANDLERHOUSEHOLD = this.cardInfo[6];
                            } else {
                                this.$message.error("身份证读取失败，请重新放置。");
                            }
                            this.cardInfo = [];
                        }, 1000);
                        break;  
                default:
            }

        },
        sex(sex) {
            var result;
            if (sex) {
                switch (sex) {
                    case "男":
                        result = "A";
                        break;
                    case "女":
                        result = "B";
                        break;
                    default:
                        result = "C";
                        break;
                }
            } else {
                result = "D";
            }
            return result;
        },
        openDialog() {
            //个性化
            let data = {};
            //火化登记是否结账
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Param.GetCremationregIsCheckout,
                res => {
                    var isInd = res.data.content;
                    if (isInd) {
                        if (this.REGISCHECK === "A") {
                            this.$confirm("是否直接进行划价?", "提示", {
                                confirmButtonText: "确定",
                                cancelButtonText: "取消",
                                type: "warning"
                            })
                                .then(() => {
                                    this.$refs.checkadd.open(
                                        ORDER.CHEMODIFY,
                                        this.chdids
                                    );
                                })
                                .catch(() => {
                                    // this.submit(false);
                                });
                        } else {
                            this.$refs.dialog.close();
                        }
                    } else {
                        this.$refs.dialog.close();
                        // this.submit(false);//提交
                    }
                }
            );
        },
        // 个性化 增加和自送登记
        RegisterCreate(index) {
            let data = JSON.parse(JSON.stringify({ CRHREGID: index }));
            apiBase.DoService(
                data,
                apiBase.getApiAdress().CremationUse.RegisterCreate,
                res => {}
            );
        },
        // 个性化  在高拍仪读取身份证的时候时候判断名字是否一致(萧山true)
        NameisChongfu() {
            apiBase.DoService(
                {},
                apiBase.getApiAdress().Param.GetIsReadCardMatchRegName,
                res => {
                    this.nameischongfus = res.data.content;
                }
            );
        }
    },
    components: {
        sweetModal,
        checkoutAdd
    },
    computed: {
        testval: {
            get: function() {
                if (
                    this.regData.REGCARDNO === null ||
                    this.regData.REGCARDNO === undefined
                )
                    return null;
            },
            set: function(val) {}
        }
    },
    mounted() {
        //在模板渲染成html后调用，通常是初始化页面完成后，再对html的dom节点进行一些需要的操作。
        Load(); //id设备索引
        //是否把input的背景颜色改变
        let data = {};
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetBackgroundColor,
            res => {
                let backcolor = "";
                if (res.data.content === "20") {
                    const inputs = document.querySelectorAll(
                        ".backcolor input.el-input__inner"
                    );
                    backcolor = "rgb(255,255,153)";
                    for (var i = 0; i < inputs.length; i++) {
                        inputs[i].style.backgroundColor = backcolor;
                    }
                } else if (res.data.content === "30") {
                    const inputs = document.querySelectorAll(
                        ".ywbackcolor input.el-input__inner"
                    );
                    backcolor = "rgb(255,255,153)";
                    for (var i = 0; i < inputs.length; i++) {
                        inputs[i].style.backgroundColor = backcolor;
                    }
                    // inputs[14].style.backgroundColor = '#FFF'
                    // inputs[21].style.backgroundColor = '#FFF'
                }
            }
        );
    },
    created() {
        this.gethallnumber(); //获取灵堂号
        this.getMemorialhall(); //获取悼念厅
        this.getCremahall(); //获取炉子编号下拉
        //在模板渲染成html前调用，即通常初始化某些属性值，然后再渲染成视图。

        let data = {};
        //舟山新加是否显示悼念厅和灵堂和送客车辆下拉
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsUseDesc,
            res => {
                this.showselect = res.data.content;
            }
        );
        //---
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsRegPageMakeup,
            res => {
                this.hidden = res.data.content;
            }
        );
        //悼念厅 灵堂 和火化炉显示 （宁波）
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsRegisUseLinMemCreDesc,
            res => {
                this.IsxialaNB = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetHighmeter,
            res => {
                ORDER.Highmeter = res.data.content;
                setTimeout(() => {
                    if (ORDER.Highmeter == 10) {
                        scanWS.connect(message => {
                            //身份证读取回调
                            this.cardInfo = message.split(" ");
                            if (this.cardInfo && this.cardInfo.length > 1) {
                                //判断大于1是为了区分拍照的回调数据
                                this.$message.success("身份证读取成功。");
                            }
                        });
                    }else if(ORDER.Highmeter == 40){
                        openidentitycard.connects(message => {
                            //身份证读取回调
                            this.cardInfo = message.split(" ");
                            if (message.indexOf("idFaceInfo:") >= 0) {
                                //判断大于1是为了区分拍照的回调数据
                                this.$message.success("身份证读取成功。");
                            }
                        });
                    }
                }, 1000);
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsIchbyRegistration,
            res => {
                ORDER.ICENUM = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsUseAshesbyCharge,
            res => {
                this.isGut = res.data.content;
            }
        );
        //排队序号是否可以修改
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsModifyDayNumByReg,
            res => {
                this.isshowdaynum = res.data.content;
            }
        );
        //是否显示出车时间
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsCdhTimeByReg,
            res => {
                this.isshowgetbodytime = res.data.content;
            }
        );
        //是否推送灵堂使用信息
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsUselinByPrp,
            res => {
                this.isshowltmanage = res.data.content;
            }
        );
        //是否把接尸地点的数据源换为统计地点
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetCreCdhaddressByStatisticaladdress,
            res => {
                // this.isshowltmanage = res.data.content;
                this.ischangedata = res.data.content;
            }
        );
        // 个性化火化炉使用是否使用登记
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetRegisterCreate,
            res => {
                this.isUse = res.data.content;
            }
        );
        // 是否打印联办单
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsPrintJointOrder,
            res => {
                this.IsPrintJointOrder = res.data.content;
            }
        );
        // 快速登记打印联办单（10）或跳转划价（20）  临海为20 直接跳划价页面
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegistrationGoToCheck,
            res => {
                this.IsRegistrationGoToCheck = res.data.content;
            }
        );
        //是否显示参保月数和是否冻结
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowForm,
            res => {
                this.isshowSource = res.data.content;
            }
        );
        //是否显示骨灰盒
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowRegcreurn,
            res => {
                this.IsShowRegcreurn = res.data.content;
            }
        );
        //是否显示义乌火化信息
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowCreBy_YW,
            res => {
                this.IsShowCreBy_YW = res.data.content;
            }
        );
        //是否默认死亡原因（义乌，兰溪不默认）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsDefaultCauseOfDeath,
            res => {
                this.CauseOfDeath = res.data.content;
            }
        );
        //是否默认骨灰去向（兰溪不默认）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsDefaultWhereaboutsOfAsh,
            res => {
                this.WhereaboutsOfAsh = res.data.content;
            }
        );
        //是否默认统计地点（义乌默认）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsDefaultAddid,
            res => {
                this.showtongji = res.data.content;
            }
        );
        //正式登记是否推送内勤使用
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegSendUse,
            res => {
                this.IsRegSendUse = res.data.content;
            }
        );
        //个性化是否显示快速登记中的条码
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsQuickRegUseBusinessnum,
            res => {
                this.pushhfmode = res.data.content;
            }
        );
        // 兰溪殡仪馆个性化快速登记弹框颜色
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetQuickRegBackColor,
            res => {
                this.colorclass = res.data.content;
            }
        );
        // 义乌殡仪馆个性化快速登记中读取逝者身份证按钮显隐
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowReadRegCardBtn,
            res => {
                this.IsShowReadRegCardBtn = res.data.content;
            }
        );
        //火化登记开放火化炉修改(义乌true)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsCremationOpenModify,
            res => {
                this.IsCremationOpenModify = res.data.content;
            }
        );
        //火化登记是否默认户籍地址(临海去掉*并且不默认，其他馆加*并且默认) 2020.3.4徐江说火化登记的户籍 默认农业  所以临海删除这个配置。
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsHouseholdMustfill,
            res => {
                this.isDefaulthjdz = res.data.content;
            }
        );
        //临海个性化 减免类型默认重点
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegiskeypointisC,
            res => {
                this.isDefaultjmlx = res.data.content;
            }
        );
        //火化登记身份证输入是否匹配联办数据
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsMatchingJointData,
            res => {
                this.IsMatchingJointData = res.data.content;
            }
        );
        //火化登记是否显示接运员(嵊州)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowCarrier,
            res => {
                this.IsShowCarrier = res.data.content;
            }
        );
        //火化登记是否显示冷藏标志(嵊州)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowKeptSign,
            res => {
                this.IsShowKeptSign = res.data.content;
            }
        );
        //火化登记是否显示未结账火化(嵊州)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowOnCheckCrema,
            res => {
                this.IsShowOnCheckCrema = res.data.content;
            }
        );
        //火化登记是否显示送客车辆(嵊州)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowPoliteCar,
            res => {
                this.IsShowPoliteCar = res.data.content;
            }
        );
        //火化登记是否显示送客里程(嵊州)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowPoliteMileage,
            res => {
                this.IsShowPoliteMileage = res.data.content;
            }
        );
        //火化登记是否显示火化炉类型 三类型(临海)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsCremationFurnace,
            res => {
                this.isshowhuo_lh = res.data.content;
            }
        );
        //火化登记是否显示火化炉类型 三类型(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsCremationFurnace_NB,
            res => {
                this.IsshowNB = res.data.content;
            }
        );
        //火化登记是否显示炉号(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegShowCreNo,
            res => {
                this.IshaoNB = res.data.content;
            }
        );
        //火化登记是否显示冷藏标记(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegShowICECODE,
            res => {
                this.IslenNB = res.data.content;
            }
        );
        //火化登记是否显示灵堂和悼念厅(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsUseLinMemByRegistration,
            res => {
                this.IslenNB = res.data.content;
            }
        );
        //火化登记是否显示财政归属(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowREGFinancesBelong,
            res => {
                this.Isshowcz = res.data.content;
            }
        );
        //火化登记是否显示接运员(宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetRegShowCarry,
            res => {
                this.Isshowjyy = res.data.content;
            }
        );
        //接运员下拉 (宁波)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Staff.QueryCarry,
            res => {
                let carryData = res.data.content,
                    legendsCarriers = carryData.map(item => ({
                        label: item.STANAME,
                        value: item.STAID
                    }));
                this.carriers = legendsCarriers;
            }
        );
        this.getNew(); //地址

        //火化登记家属信息不必输红色标记取消(余姚)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegHandlerOptional,
            res => {
                this.onshow = res.data.content;    //true
            }
        );

        //火化登记匹配联办数据按钮显隐（上虞）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegShowMateLBDataBtn,
            res => {
                this.checklianban = res.data.content;    //true
            }
        );
        //已到馆是否可以使用快速匹配（义乌）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegUseQuickMatch,
            res => {
                this.iskuaisu = res.data.content;    //true
            }
        );
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsRegisDefaultCreSameday,
            res => {
                this.isRegisDefaultCreSameday = res.data.content; // true //打开弹框是否默认火化日期 true 不默认 false 默认
            }
        );
    },

    watch: {
        "regDataEexend.regDeathDate": function(val) {
            this.regData.REGDEATHDATE = formatDate(val, "yyyyMMdd");
        },
        "regData.REGSOCIALYEAR": function(val) {
            const inputs = document.querySelectorAll(
                ".backcolorred input.el-input__inner"
            );
            if (inputs.length != 0) {
                if (val < 0) {
                    inputs[0].style.backgroundColor = "red";
                } else {
                    inputs[0].style.backgroundColor = "white";
                }
            }
        },
        "regData.REGFROZEN": function(val) {
            const inputs = document.querySelectorAll(
                ".backcolorred input.el-input__inner"
            );
            const backbox = document.querySelector(
                ".sweet-content"
            );
            if (inputs.length != 0) {
                if (val === "否") {
                    inputs[1].style.backgroundColor = "white";
                     backbox.style.backgroundColor="white"
                } else if (val === "是") {
                    inputs[1].style.backgroundColor = "red";
                    backbox.style.backgroundColor="#75b1dc"
                } else {
                    inputs[1].style.backgroundColor = "white";
                    backbox.style.backgroundColor="white"
                }
            }
        },
        "regDataEexend.RegBirthDate": function(val) {
          this.regData.REGBIRTHDATE = formatDate(val, "yyyyMMdd");
        //   let now = new Date();
        //   var nY = now.getFullYear();
        //   var nM = now.getMonth() + 1;
        //   var nD = now.getDate();
        //   if (val) {
        //     var dY = val.getFullYear();
        //     var dM = val.getMonth() + 1;
        //     var dD = val.getDate();
        //     var adjust;
        //     if (nM * 31 + nD >= dM * 31 + dD) {
        //       adjust = 0;
        //     } else adjust = -1;
        //     this.regData.REGAGE = now.getFullYear() - val.getFullYear() + adjust;
        //   }
        },
        "regDataEexend.regDataTime": function(val) {
            this.regData.REGDATE = formatDate(val, "yyyyMMdd");
            this.regData.REGTIME = formatDate(val, "hhmmss");
        },
        "regDataEexend.regCremationDate": function(val) {
            this.regData.REGCREMATIONDATE = formatDate(val, "yyyyMMdd");
        },
        // "regData.REGCARDNO": function(val) {
        //   this.regDataEexend.RegBirthDate = null;
        //   if (val === null || val === undefined) return;
        //   var strDate;
        //   if (this.regData.REGCARDNO.length === 15)
        //     strDate = "19" + this.regData.REGCARDNO.substr(6, 6);
        //   else if (this.regData.REGCARDNO.length === 18)
        //     strDate = this.regData.REGCARDNO.substr(6, 8);
        //   else return;
        //   this.regDataEexend.RegBirthDate = dateStringToDate(strDate);
        // },
        "cdhdataEexend.cardata": function(val) {
            this.cdhdata.CDHCARID = val[1];
        },
        cauinfos: function(val) {
            this.regData.REGCAUSA = val[0];
            this.regData.REGCAUSASON = val[1];
        },
        ctyLists: function(val) {
            if (val.length === 0) {
                this.regData.REGHOUSEHOLD = "";
            } else {
                this.regData.REGHOUSEHOLD = val[val.length-1];
            }
        }
    }
};
</script>
